Increasing Singlefile header size because some URLs may be very long.

This commit is contained in:
Roland 2022-12-14 15:14:50 -07:00
parent cdc02ecaf2
commit ff292b6e3f
No known key found for this signature in database
GPG key ID: 9D6DBD3ACF11AB93
2 changed files with 2 additions and 2 deletions

View file

@ -507,7 +507,7 @@ def is_singlefile_file(path: pathlib.Path) -> bool:
return True
with path.open('rt') as fh:
# Lastly, try to read the header of this HTML file.
header = fh.read(500)
header = fh.read(1000)
if SINGLEFILE_HEADER in header:
return True
return False

View file

@ -149,7 +149,7 @@ class Archive(Base, ModelHelper):
raise ValueError('Cannot read singlefile data when this has no files')
with path.open('rt') as fh:
head = fh.read(500)
head = fh.read(1000)
if 'Page saved with SingleFile' not in head:
return
try: