Skip to content

Commit

Permalink
Update file_utils.py
Browse files Browse the repository at this point in the history
request.head  also require use url_proxies variable
  • Loading branch information
diego-morientez authored and helpmefindaname committed Aug 23, 2024
1 parent 3d8f078 commit f8c0017
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion flair/file_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ def get_from_cache(url: str, cache_dir: Path) -> Path:
return cache_path

# make HEAD request to check ETag
response = requests.head(url, headers={"User-Agent": "Flair"}, allow_redirects=True)
response = requests.head(url, headers={"User-Agent": "Flair"}, allow_redirects=True, proxies=url_proxies)
if response.status_code != 200:
raise OSError(f"HEAD request failed for url {url} with status code {response.status_code}.")

Expand Down

0 comments on commit f8c0017

Please sign in to comment.