豆豆友情提示:这是一个非官方 GitHub 代理镜像,主要用于网络测试或访问加速。请勿在此进行登录、注册或处理任何敏感信息。进行这些操作请务必访问官方网站 github.com。 Raw 内容也通过此代理提供。
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