Skip to content

Commit

Permalink
Merge pull request #3535 from diego-morientez/patch-1
Browse files Browse the repository at this point in the history
Add proxies information to requests.head
  • Loading branch information
helpmefindaname authored Aug 23, 2024
2 parents b72bea3 + f4f34ea commit d4a48a1
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 d4a48a1

Please sign in to comment.