Skip to content

Commit 7a65900

Browse files
clin1234hugovkblurb-it[bot]encukou
authored
gh-145717: Add a few Microsoft-specific MIME types, and synchronize between mimetypes module and tests (#145718)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com> Co-authored-by: Petr Viktorin <encukou@gmail.com>
1 parent e13f6dc commit 7a65900

File tree

3 files changed

+12
-0
lines changed

3 files changed

+12
-0
lines changed

Doc/whatsnew/3.15.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -828,6 +828,14 @@ mimetypes
828828
* Add ``application/sql`` and ``application/vnd.sqlite3``.
829829
(Contributed by Charlie Lin in :gh:`145698`.)
830830
* Add ``image/jxl``. (Contributed by Foolbar in :gh:`144213`.)
831+
* Add the following MIME types:
832+
833+
- ``application/vnd.ms-cab-compressed`` for ``.cab`` extension
834+
- ``application/vnd.ms-htmlhelp`` for ``.chm`` extension
835+
- ``application/vnd.ms-officetheme`` for ``.thmx`` extension
836+
837+
(Contributed by Charlie Lin in :gh:`145718`.)
838+
831839
* Rename ``application/x-texinfo`` to ``application/texinfo``.
832840
(Contributed by Charlie Lin in :gh:`140165`.)
833841
* Changed the MIME type for ``.ai`` files to ``application/pdf``.

Lib/mimetypes.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -510,9 +510,12 @@ def _default_mime_types():
510510
'.m3u8' : 'application/vnd.apple.mpegurl',
511511
'.dll' : 'application/vnd.microsoft.portable-executable',
512512
'.exe' : 'application/vnd.microsoft.portable-executable',
513+
'.cab' : 'application/vnd.ms-cab-compressed',
513514
'.xls' : 'application/vnd.ms-excel',
514515
'.xlb' : 'application/vnd.ms-excel',
515516
'.eot' : 'application/vnd.ms-fontobject',
517+
'.chm' : 'application/vnd.ms-htmlhelp',
518+
'.thmx' : 'application/vnd.ms-officetheme',
516519
'.ppt' : 'application/vnd.ms-powerpoint',
517520
'.pot' : 'application/vnd.ms-powerpoint',
518521
'.ppa' : 'application/vnd.ms-powerpoint',
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Add a few Microsoft-specific MIME types.

0 commit comments

Comments
 (0)