-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Description
Greetings,
I'm interested in using this library in a small project, where I'll also need to get the correct MIME type for YAML files.
Observed
> mimetypes = require 'mimetypes'
> mimetypes.guess("file.yml")
text/yml
> mimetypes.guess("file.yaml")
text/yamlExpected
As of 2025, I would have expected application/yaml.
(BTW. I don't know what text/yml is supposed to be, vs. text.yaml)
Rationale:
Historically, YAML was supposedly referenced as (mostly) application/x-yaml, or (sometimes) as text/yaml or text/x-yaml.
It took more than 22 years for YAML to be recognized, but in early 2024 it was finally officially registered, see RFC9512
- The official MIME type is
application/yaml. - Older (used by non-registered) aliases
application/x-yaml,text/yaml, andtext/x-yamlare deprecated. - The RFC states the usual file extensions are
yaml(preferred) andyml, see 3.3. - (The
+yamlsuffix is also registered, but that's not relevant for the discussion here)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels