Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[Mime] switching source of mime types from Apache to "MIME-db"#37422
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
desarrolla2 commentedJun 26, 2020
| Q | A |
|---|---|
| Branch? | master |
| Bug fix? | no |
| New feature? | no |
| Deprecations? | no |
| Tickets | Fix#37412 |
| License | MIT |
| Doc PR | no |
desarrolla2 commentedJun 26, 2020 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
I preferred to use the "v1.44.0" tag instead of master because they recommend it, since there may be json format changes in the future. Maybe you prefer that I use master branch and this script fails, if format changes. |
fabpot commentedJun 26, 2020
Great! Can you apply fabbot's patch? Also, can you run the script to see the diff with what we have now? |
| 'audio/mp3' => ['mp3','mpga'], | ||
| 'audio/mp4' => ['m4a','mp4a','f4a'], | ||
| 'audio/mpeg' => ['mp3','mpga','mp2','mp2a','m2a','m3a'], | ||
| 'audio/mpeg' => ['mpga','mp2','mp2a','mp3','m2a','m3a'], |
nicolas-grekasJun 26, 2020 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
related to#37389, mp3 should be first?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Yes, it's the most common format. You can also addmp1 like definedhere (page3).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
@YaFou could you please report this tohttps://github.com/jshttp/mime-db? Maybe send them a PR also?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
I will do that this evening!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
@YaFou can you revert this change, maybe adding a comment like// mp3 should be first
same in other places where I commented about ordering?
that'd allow unlocking this PR
nicolas-grekasJun 30, 2020 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
I meant@desarrolla2 sorry
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
@nicolas-grekas do you want that:
a) I put the extensions in the order that you comment at MimeTypes.php
b) I update the script update_mime_types.php to force that order after download sources
c) I add comments with your suggestions at MimeTypes.php
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
I think b) would be good. Then the comments would be found in update_mime_types.php only.
| 'text/x-lyx' => ['lyx'], | ||
| 'text/x-makefile' => ['mk','mak'], | ||
| 'text/x-markdown' => ['md','mkd','markdown'], | ||
| 'text/x-markdown' => ['mkd','md','markdown'], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
if the 1st is the most used, thenmd should be first?
does the order mean something in the source db?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
For reference, the source DB uses this preference for merging the multiple sources:
// source preference (least -> most)var preference = ['nginx', 'apache', undefined, 'iana']| 'application/vnd.appimage' => ['appimage'], | ||
| 'application/vnd.apple.installer+xml' => ['mpkg'], | ||
| 'application/vnd.apple.keynote' => ['key'], | ||
| 'application/vnd.apple.keynote' => ['keynote','key'], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
key should be first ?
nicolas-grekas commentedJun 26, 2020 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Thanks for working on this. |
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
desarrolla2 commentedJul 3, 2020
should i rebase the commit to improve the history? |
stof commentedJul 3, 2020
@desarrolla2 yes please |
| 'msg' => ['application/vnd.ms-outlook'], | ||
| 'msh' => ['model/mesh'], | ||
| 'msi' => ['application/x-msdownload','application/x-msi'], | ||
| 'msi' => ['application/octet-stream','application/x-msdownload','application/x-msi'], |
nicolas-grekasJul 4, 2020 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
I've checked the source and I think we should always list'application/octet-stream' last.
Alternatively, we should just skip it. The reason is that we already fallback to'application/octet-stream' by default inDataPart. For sure, listing it first is going to be a regression.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
@nicolas-grekas you prefer that:
a) I put 'application/octet-stream' last.
b) I skip 'application/octet-stream'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Skipping would be best IMHO
Uh oh!
There was an error while loading.Please reload this page.
fabpot commentedJul 15, 2020
@desarrolla2 I've fixed your last commit. |
nicolas-grekas commentedJul 15, 2020
Thank you@desarrolla2. |