Closed gmcgibbon closed 5 years ago
Have we thought of these kind of use-cases and which one is actually correct?
Yes. Lookups return the highest priority, nonobsolete, registered match.
tells me
*.js
uses base64 encoding
Yes. Note that "encoding" indicates the content transfer encoding used for non-8bit-clean channels, like email attachments.
Returning application/ecmascript
for the .js
extension seems to be a regression on the mime-types-data
repo which is where I believe mini_mime
gets its database from.
You can find more details in the PR I opened regarding this: https://github.com/mime-types/mime-types-data/pull/20
In
mime-types
, I can do this:but in
mini_mime
, it assumes only one return. This is specifically annoying for JavaScript because I can do:which tells me
*.js
uses base64 encoding. Have we thought of these kind of use-cases and which one is actually correct?I should also mention there is a definition for
application/javascript
in the content type DB but you'll never reach it by looking up via extension.