diff --git a/src/poetry/inspection/lazy_wheel.py b/src/poetry/inspection/lazy_wheel.py index 54f566bb3c6..60d9d29b41a 100644 --- a/src/poetry/inspection/lazy_wheel.py +++ b/src/poetry/inspection/lazy_wheel.py @@ -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)