Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

What is up with version 2.4.1? #18

Closed
drasive opened this issue May 26, 2023 · 6 comments
Closed

What is up with version 2.4.1? #18

drasive opened this issue May 26, 2023 · 6 comments

Comments

@drasive
Copy link

drasive commented May 26, 2023

There is a NuGet package released with version 2.4.1 uploaded on 2023-02-21: https://www.nuget.org/packages/MimeTypes/2.4.1. It was released by Kristian Hellang, the owner of this Repository.

As of today, this repository does not contain a tag for version 2.4.1, no commits in 2023 and the code released is different from the code in this repository: Compare MimeTypes.cs.pp in this repo with contentFiles/cs/*/MimeTypes.cs.pp in Release 2.4.1.

The differences between the code released and the code in this repository are not backwards compatible. E.g. getting the MIME type for a file with ".mp4" extension returns "application/mp4" in v2.4.1 instead of "video/mp4".

What is up with this?

@khellang
Copy link
Owner

Hi @drasive! 👋🏻

The version was pushed in a hurry and the commit was never pushed properly to GitHub. It's there now; 8942472.

Sorry about that 😅

@khellang
Copy link
Owner

The differences between the code released and the code in this repository are not backwards compatible. E.g. getting the MIME type for a file with ".mp4" extension returns "application/mp4" in v2.4.1 instead of "video/mp4".

mp4 is officially registered with IANA as application/mp4. See jshttp/mime-db#207

@gosko
Copy link

gosko commented Jun 20, 2023

Hi @khellang, mp4 is also registered with IANA as video/mp4, so mime-db has multiple entries associated with .mp4 in its DB. I believe consumers of mime-db need some logic to decide which one has precedence. I noticed mime-score seems to prefer application/ but I'm not sure why.

The other day I started a discussion about GitHub Pages' handling of .mp4 files because I think video/mp4 is a more sensible default. If my understanding is wrong I'd be happy to learn more!

(Just commenting here because I haven't seen many other discussions about this recent change to mime-db. I expect this will cause more things to break once there is a new release of mime-db)

@khellang
Copy link
Owner

Yeah, I noticed that. Honestly, this package just picks the first media type from mime-db's list. I guess I'll have to introduce a way to override certain media types, unless we can find a good heuristic for which to pick by default.

@tcbyrd
Copy link

tcbyrd commented Jun 21, 2023

The other day I started a discussion about GitHub Pages' handling of .mp4 files because I think video/mp4 is a more sensible default.

(hi from Pages team). I tend to agree. I have a PR open internally to prefer video/mp4 for .mp4 extensions. This would have the side effect of making the user have to use a different extension for application/mp4, but since the latter is newer that feels more practical to me since it doesn't break long-standing assumptions about .mp4 files being videos. If there's no objections I'll change it on the Pages side at least.

@gosko
Copy link

gosko commented Jun 21, 2023

Excellent! Hope your PR is accepted!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants