mirror of
https://github.com/python/cpython.git
synced 2025-10-06 23:21:06 +00:00
bpo-38449: Revert "bpo-22347: Update mimetypes.guess_type to allow oper parsing of URLs (GH-15522)" (GH-16724)
This reverts commit 87bd2071c7
.
https://bugs.python.org/issue38449
This commit is contained in:
parent
2b7dc40b2a
commit
19a3d87300
5 changed files with 4 additions and 13 deletions
|
@ -114,8 +114,7 @@ class MimeTypes:
|
|||
but non-standard types.
|
||||
"""
|
||||
url = os.fspath(url)
|
||||
p = urllib.parse.urlparse(url)
|
||||
scheme, url = p.scheme, p.path
|
||||
scheme, url = urllib.parse._splittype(url)
|
||||
if scheme == 'data':
|
||||
# syntax of data URLs:
|
||||
# dataurl := "data:" [ mediatype ] [ ";base64" ] "," data
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue