Skip to content

Commit

Permalink
Fix download error
Browse files Browse the repository at this point in the history
GitHub doesn't seem to like setting "Accept: application/zip" when download a
log URL, even though the Content-Type for the response is application/zip.
  • Loading branch information
jwodder committed Nov 9, 2023
1 parent 63e34ff commit d8fe421
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/tinuous/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ def download_zipfile(self, path: str, target_dir: Path) -> None:
zippath = Path(fpath)
i = 0
while True:
self.download(path, zippath, headers={"Accept": "application/zip"})
self.download(path, zippath, headers={"Accept": "*/*"})
try:
with ZipFile(zippath) as zf:
zf.extractall(target_dir)
Expand Down

0 comments on commit d8fe421

Please sign in to comment.