diff --git a/src/huggingface_hub/file_download.py b/src/huggingface_hub/file_download.py index bf0fd3fc8a..cbfb26e4d8 100644 --- a/src/huggingface_hub/file_download.py +++ b/src/huggingface_hub/file_download.py @@ -683,6 +683,7 @@ def cached_download( # Useful for lfs blobs that are stored on a CDN. if 300 <= r.status_code <= 399: url_to_download = r.headers["Location"] + headers.pop("authorization", None) except (requests.exceptions.SSLError, requests.exceptions.ProxyError): # Actually raise for those subclasses of ConnectionError raise