-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
gh-129965: Add missing MIME types #129969
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
Changes from 10 commits
f6bf727
1b4a38b
0ec5795
a27f4ba
477c165
8133f8b
fb49b4d
6933a5a
253df16
1162232
bcc326c
1d0500f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -463,6 +463,7 @@ def _default_mime_types(): | |
types_map = _types_map_default = { | ||
'.js' : 'text/javascript', | ||
'.mjs' : 'text/javascript', | ||
'.epub' : 'application/epub+zip', | ||
'.json' : 'application/json', | ||
'.webmanifest': 'application/manifest+json', | ||
'.doc' : 'application/msword', | ||
|
@@ -478,6 +479,7 @@ def _default_mime_types(): | |
'.obj' : 'application/octet-stream', | ||
'.so' : 'application/octet-stream', | ||
'.oda' : 'application/oda', | ||
'.ogx' : 'application/ogg', | ||
'.pdf' : 'application/pdf', | ||
'.p7c' : 'application/pkcs7-mime', | ||
'.ps' : 'application/postscript', | ||
|
@@ -494,6 +496,13 @@ def _default_mime_types(): | |
'.ppa' : 'application/vnd.ms-powerpoint', | ||
'.pps' : 'application/vnd.ms-powerpoint', | ||
'.pwz' : 'application/vnd.ms-powerpoint', | ||
'.odg' : 'application/vnd.oasis.opendocument.graphics', | ||
'.odp' : 'application/vnd.oasis.opendocument.presentation', | ||
'.ods' : 'application/vnd.oasis.opendocument.spreadsheet', | ||
'.odt' : 'application/vnd.oasis.opendocument.text', | ||
'.pptx' : 'application/vnd.openxmlformats-officedocument.presentationml.presentation', | ||
'.xlsx' : 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', | ||
'.docx' : 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', | ||
'.wasm' : 'application/wasm', | ||
'.bcpio' : 'application/x-bcpio', | ||
'.cpio' : 'application/x-cpio', | ||
|
@@ -544,17 +553,21 @@ def _default_mime_types(): | |
'.ass' : 'audio/aac', | ||
'.au' : 'audio/basic', | ||
'.snd' : 'audio/basic', | ||
'.flac' : 'audio/flac', | ||
'.mka' : 'audio/matroska', | ||
'.m4a' : 'audio/mp4', | ||
'.mp3' : 'audio/mpeg', | ||
'.mp2' : 'audio/mpeg', | ||
'.ogg' : 'audio/ogg', | ||
'.opus' : 'audio/opus', | ||
'.aif' : 'audio/x-aiff', | ||
'.aifc' : 'audio/x-aiff', | ||
'.aiff' : 'audio/x-aiff', | ||
'.ra' : 'audio/x-pn-realaudio', | ||
'.wav' : 'audio/x-wav', | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This will make There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, we can only have a single type per extension with this dict implementation (there's also #122632 that proposes dealing with duplicates; I've not looked closely at it). If we can only choose one, I think handling for the standards-based type is more useful than an Also This is also a reason why this kind of change is only made as a feature with no backports. But happy to revert this one if you prefer. |
||
'.wav' : 'audio/vnd.wave', | ||
'.otf' : 'font/otf', | ||
'.ttf' : 'font/ttf', | ||
'.weba' : 'audio/webm', | ||
'.woff' : 'font/woff', | ||
'.woff2' : 'font/woff2', | ||
'.avif' : 'image/avif', | ||
|
@@ -627,10 +640,11 @@ def _default_mime_types(): | |
'.mpa' : 'video/mpeg', | ||
'.mpe' : 'video/mpeg', | ||
'.mpg' : 'video/mpeg', | ||
'.ogv' : 'video/ogg', | ||
'.mov' : 'video/quicktime', | ||
'.qt' : 'video/quicktime', | ||
'.webm' : 'video/webm', | ||
'.avi' : 'video/x-msvideo', | ||
'.avi' : 'video/vnd.avi', | ||
'.movie' : 'video/x-sgi-movie', | ||
} | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Update MIME types for ``.avi`` and ``.wav``. Add MIME types for ``.docx``, | ||
``.pptx``, ``.xlsx``, ``.epub``, ``.flac``, ``.m4a``, ``.odg``, ``.odp``, | ||
``.ods``, ``.odt``, ``.oga``, .``ogg``, ``.ogx`` and ``.weba``. Patch by | ||
hugovk marked this conversation as resolved.
Show resolved
Hide resolved
|
||
Hugo van Kemenade. |
Uh oh!
There was an error while loading. Please reload this page.