mirror of
https://github.com/ArchiveBox/ArchiveBox.git
synced 2025-06-02 07:39:52 -04:00
fix: Improve headers handling
This commit is contained in:
parent
a40af98ced
commit
62ed11a5ca
6 changed files with 60 additions and 3 deletions
|
@ -16,6 +16,7 @@ from ..config import (
|
|||
CURL_USER_AGENT,
|
||||
CURL_VERSION,
|
||||
CHECK_SSL_VALIDITY,
|
||||
SAVE_HEADERS
|
||||
)
|
||||
from ..logging_util import TimedProgress
|
||||
|
||||
|
@ -24,7 +25,7 @@ def should_save_headers(link: Link, out_dir: Optional[str]=None) -> bool:
|
|||
out_dir = out_dir or link.link_dir
|
||||
|
||||
output = Path(out_dir or link.link_dir) / 'headers.json'
|
||||
return not output.exists()
|
||||
return not output.exists() and SAVE_HEADERS
|
||||
|
||||
|
||||
@enforce_types
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue