]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.12] gh-66543: Fix mimetype.guess_type() (GH-117217) (GH-117256)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Tue, 26 Mar 2024 11:43:36 +0000 (12:43 +0100)
committerGitHub <noreply@github.com>
Tue, 26 Mar 2024 11:43:36 +0000 (11:43 +0000)
commit36b1a208511532bfdc633fc823fce694ec082e59
tree6d34e0bb33db294357506c703d4b3eb40832ccd7
parent54514467c26c657eb1a6f8885786297979689d2d
[3.12] gh-66543: Fix mimetype.guess_type() (GH-117217) (GH-117256)

Fix parsing of the following corner cases:

* URLs with only a host name
* URLs containing a fragment
* URLs containing a query
* filenames with only a UNC sharepoint on Windows

(cherry picked from commit 9654daf793b534b44a831c80f43505ab9e380f1f)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Dong-hee Na <donghee.na92@gmail.com>
Lib/mimetypes.py
Lib/test/test_mimetypes.py
Lib/test/test_urllib2.py
Misc/NEWS.d/next/Library/2019-08-27-01-03-26.gh-issue-66543._TRpYr.rst [new file with mode: 0644]