mirror of
https://github.com/tuna/tunasync-scripts.git
synced 2025-04-20 04:12:42 +00:00
docker-ce: allow redir on head requests
This commit is contained in:
parent
a903bd13ab
commit
211e9c5565
@ -108,7 +108,7 @@ def downloading_worker(q):
|
|||||||
url, dst_file, working_dir = item
|
url, dst_file, working_dir = item
|
||||||
if dst_file.is_file():
|
if dst_file.is_file():
|
||||||
print("checking", url, flush=True)
|
print("checking", url, flush=True)
|
||||||
r = requests.head(url, timeout=TIMEOUT_OPTION)
|
r = requests.head(url, timeout=TIMEOUT_OPTION, allow_redirects=True)
|
||||||
remote_filesize = int(r.headers['content-length'])
|
remote_filesize = int(r.headers['content-length'])
|
||||||
remote_date = parsedate_to_datetime(r.headers['last-modified'])
|
remote_date = parsedate_to_datetime(r.headers['last-modified'])
|
||||||
stat = dst_file.stat()
|
stat = dst_file.stat()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user