mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Edit book: Download external resources: Fix incorrect filename if the server returns a generic Content-Type header
Fix #2099754 [Private bug](https://bugs.launchpad.net/calibre/+bug/2099754)
This commit is contained in:
parent
85e930555c
commit
249c2d11a1
@ -62,7 +62,7 @@ def get_filename(original_url_parsed, response):
|
||||
ct = headers.get_params()[0][0].lower()
|
||||
except Exception:
|
||||
ct = ''
|
||||
if ct:
|
||||
if ct and ct != 'application/octet-stream':
|
||||
mt = guess_type(ans)
|
||||
if mt != ct:
|
||||
exts = mimetypes.guess_all_extensions(ct)
|
||||
|
Loading…
x
Reference in New Issue
Block a user