Disable Content-disposition check for now
Some packages (nextcloud-client) for example have different filename in this header, and so I miss new versions
This commit is contained in:
parent
90464f8697
commit
8e25050f4a
@ -337,10 +337,12 @@ def tryurl(fileurl, template):
|
||||
|
||||
headers = fp.info()
|
||||
|
||||
if 'Content-disposition' in headers and \
|
||||
basename not in headers['Content-disposition']:
|
||||
result = None
|
||||
elif 'Content-Length' in headers and headers['Content-Length'] == '0':
|
||||
# Some URLs return Content-disposition with different filename
|
||||
# Disable check for now (I have no seen false positives)
|
||||
#if 'Content-disposition' in headers and \
|
||||
# basename not in headers['Content-disposition']:
|
||||
# result = None
|
||||
if 'Content-Length' in headers and headers['Content-Length'] == '0':
|
||||
result = None
|
||||
elif 'Content-Type' in headers and \
|
||||
'text/html' in headers['Content-Type']:
|
||||
|
Loading…
Reference in New Issue
Block a user