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()
|
headers = fp.info()
|
||||||
|
|
||||||
if 'Content-disposition' in headers and \
|
# Some URLs return Content-disposition with different filename
|
||||||
basename not in headers['Content-disposition']:
|
# Disable check for now (I have no seen false positives)
|
||||||
result = None
|
#if 'Content-disposition' in headers and \
|
||||||
elif 'Content-Length' in headers and headers['Content-Length'] == '0':
|
# basename not in headers['Content-disposition']:
|
||||||
|
# result = None
|
||||||
|
if 'Content-Length' in headers and headers['Content-Length'] == '0':
|
||||||
result = None
|
result = None
|
||||||
elif 'Content-Type' in headers and \
|
elif 'Content-Type' in headers and \
|
||||||
'text/html' in headers['Content-Type']:
|
'text/html' in headers['Content-Type']:
|
||||||
|
Loading…
Reference in New Issue
Block a user