]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.11] gh-66543: Fix mimetype.guess_type() (GH-117217) (GH-117257)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Tue, 26 Mar 2024 11:46:28 +0000 (12:46 +0100)
committerGitHub <noreply@github.com>
Tue, 26 Mar 2024 11:46:28 +0000 (11:46 +0000)
commit2d932361a8f81967363a6a9a82b3fa15283d034c
tree5c5d190016b903f37da706a70f987a9e187b3e7d
parent1112e01da18700c1628a16dec9369caaca22ea92
[3.11] gh-66543: Fix mimetype.guess_type() (GH-117217) (GH-117257)

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]