Skip to content

Commit

Permalink
Use file extension from content-type instead
Browse files Browse the repository at this point in the history
  • Loading branch information
iandees committed Sep 9, 2023
1 parent b6b6f19 commit 263afce
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions openaddr/cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,8 +207,11 @@ def guess_url_file_extension(url):
if path_ext == attachment_ext:
_L.debug('Content-Disposition agrees: "{}"'.format(match.group('filename')))
else:
_L.debug('Content-Disposition disagrees: "{}", using "{}" instead'.format(match.group('filename'), attachment_ext))
path_ext = attachment_ext
_L.debug('Content-Disposition disagrees: "{}" says we should use "{}", using "{}" instead'.format(
match.group('filename'),
attachment_ext,
path_ext,
))

if not path_ext:
#
Expand Down

0 comments on commit 263afce

Please sign in to comment.