jshttp/mime-db

YAML missing some types

6XGate opened this issue ยท 5 comments

As published by the IETF in HTTP API, some deprecated types for YAML are application/x-yaml, text/yaml, text/x-yaml. While this is from a draft spec, several software suites (server, desktop, etc.) use the others. YAML though appears to have never been official registered, at least not with IANA's MIME DB. While keeping text/yaml the default for the yaml type, the other should likely point back to the .yaml extension and have a UTF-8 canonical character type associated with them.

Hello, and thank you for your issue. This module does not include deprecated (or as IANA generally calls "obsolete") types, as such they are omitted on purpose. I can add a note to the readme for clarity on this ๐Ÿ‘

Any idea what package might handle all legacy types?

It looks like the existing entry is from the original merge of data from the mime lib so has no source. Probably needs to be changed to application/yaml.

I see the YAML project itself doesn't even seem to have a grasp on what their media type is, however ๐Ÿค” yaml/yaml-spec#49

Any idea what package might handle all legacy types?

No, sadly I am not familiar with any other libs since I made this to serve my needs ๐Ÿ‘

Yes, and to complicate matters. The GNOME MIME database uses application/x-yaml. Thought it seems that is the time of DB I'm looking for since what I want to know is the related type to the MIME type of a file determined by AWS S3 and MinIO.

Gotcha. Yea, I just made this to list out the type data from the three sources at the top of the readme: IANA, Apache, and NGINX. I imported initial defs from an old Node.js project I was using before and this was one of them. Maybe just removing yaml is better and let someone add to IANA at some point.