Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Lib/mimetypes.py
Original file line number Diff line number Diff line change
Expand Up @@ -495,10 +495,10 @@ def _default_mime_types():
'.so' : 'application/octet-stream',
'.oda' : 'application/oda',
'.ogx' : 'application/ogg',
'.ai' : 'application/pdf',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the .pdf should go first here, from the comment:

# Make sure the entry with the preferred file extension for a particular mime type
# appears before any others of the same mimetype.

Copy link
Member

@bitdancer bitdancer Nov 9, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ideally we'd add a test that .pdf is returned as the preferred extension for application/pdf.

'.pdf' : 'application/pdf',
'.p7c' : 'application/pkcs7-mime',
'.ps' : 'application/postscript',
'.ai' : 'application/postscript',
'.eps' : 'application/postscript',
'.texi' : 'application/texinfo',
'.texinfo': 'application/texinfo',
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
:mod:`mimetypes`: Update mime type for ``.ai`` files to ``application/pdf``.
Loading