Skip to content

Commit

Permalink
fix mimetype detection for uppercase file extensions
Browse files Browse the repository at this point in the history
  • Loading branch information
9001 committed May 8, 2024
1 parent e396c5c commit 565daee
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion copyparty/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -2681,7 +2681,7 @@ def unescape_cookie(orig: str) -> str:

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

Expand Down

0 comments on commit 565daee

Please sign in to comment.