Skip to content

Commit

Permalink
Allow initial HEAD to use redirects in lazy_wheel
Browse files Browse the repository at this point in the history
Fixes #9039
  • Loading branch information
thatch committed Feb 27, 2024
1 parent e8329d4 commit c515344
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/poetry/inspection/lazy_wheel.py
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@ def _content_length_from_head(self) -> int:
:raises HTTPRangeRequestUnsupported: if the response fails to indicate support
for "bytes" ranges."""
self._request_count += 1
head = self._session.head(self._url, headers=self._uncached_headers())
head = self._session.head(self._url, headers=self._uncached_headers(), allow_redirects=True)
head.raise_for_status()
assert head.status_code == codes.ok
accepted_range = head.headers.get("Accept-Ranges", None)
Expand Down

0 comments on commit c515344

Please sign in to comment.