fix mimetype detection for uppercase file extensions

This commit is contained in:
ed 2024-05-08 20:08:11 +00:00
parent e396c5c2b5
commit 565daee98b

View file

@ -2681,7 +2681,7 @@ def unescape_cookie(orig: str) -> str:
def guess_mime(url: str, fallback: str = "application/octet-stream") -> str: def guess_mime(url: str, fallback: str = "application/octet-stream") -> str:
try: try:
_, ext = url.rsplit(".", 1) ext = url.rsplit(".", 1)[1].lower()
except: except:
return fallback return fallback