dart-lang / tools

This repository is home to tooling related Dart packages.
BSD 3-Clause "New" or "Revised" License
30 stars 21 forks source link

Don't use `x-*` MIME types when possible #588

Open Abion47 opened 1 month ago

Abion47 commented 1 month ago

MIME types that have the x-* prefix are by definition non-standard extension types. Many formats that used to use these types no longer do as they have become official MIME types recognized by the IANA, but the mime package is still using the x-* mime type on many of them. This can cause problems as many APIs will support the standard form but not the non-standard extension form, so they should be updated where appropriate.

Here are some examples:

audio/x-aiff => audio/aiff
audio/x-wav => audio/wav (or) audio/vnd.wav
kevmoo commented 1 month ago

Wondering if we should just base our data off https://github.com/patrickmccallum/mimetype-io/blob/master/src/mimeData.json or similar...hrm...