Skip to content

gh-92455: Respect case-sensitive mimetype suffixes#148782

Open
yuanx749 wants to merge 3 commits intopython:mainfrom
yuanx749:fix-mimetypes-case-sensitive-add-type
Open

gh-92455: Respect case-sensitive mimetype suffixes#148782
yuanx749 wants to merge 3 commits intopython:mainfrom
yuanx749:fix-mimetypes-case-sensitive-add-type

Conversation

@yuanx749
Copy link
Copy Markdown
Contributor

Fixes gh-92455.

As described in the issue, the current implementation cannot find uppercase
extensions added via mimetypes.add_type(). This appears to be a regression from gh-30229.

This restores the lookup order documented for mimetypes.guess_type():
type suffixes are tried case-sensitively first, then case-insensitively.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

1 participant