From 66bda1720a76376969d78d4809f2cb9c8904507a Mon Sep 17 00:00:00 2001 From: Tomas Kopecek Date: Aug 17 2022 08:24:15 +0000 Subject: cli: allow redirects for file size checking Related: https://pagure.io/koji/issue/3463 --- diff --git a/cli/koji_cli/lib.py b/cli/koji_cli/lib.py index 2c69ff6..229f697 100644 --- a/cli/koji_cli/lib.py +++ b/cli/koji_cli/lib.py @@ -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'])