mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
gh-128703: Fix mimetypes.guess_type for empty Content-Type in registry (GH-128854)
This commit is contained in:
parent
3402e133ef
commit
303043f506
2 changed files with 4 additions and 0 deletions
|
@ -90,6 +90,8 @@ class MimeTypes:
|
|||
list of standard types, else to the list of non-standard
|
||||
types.
|
||||
"""
|
||||
if not type:
|
||||
return
|
||||
self.types_map[strict][ext] = type
|
||||
exts = self.types_map_inv[strict].setdefault(type, [])
|
||||
if ext not in exts:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue