cli: allow redirects for file size checking
Related: https://pagure.io/koji/issue/3463
This commit is contained in:
parent
f4bb294d4f
commit
df44502792
1 changed files with 1 additions and 1 deletions
|
|
@ -569,7 +569,7 @@ def download_file(url, relpath, quiet=False, noprogress=False, size=None,
|
|||
print("Downloading: %s" % relpath)
|
||||
|
||||
if not filesize:
|
||||
response = requests.head(url, timeout=10)
|
||||
response = requests.head(url, timeout=10, allow_redirects=True)
|
||||
if response.status_code == 200 and response.headers.get('Content-Length'):
|
||||
filesize = int(response.headers['Content-Length'])
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue