Request to download the package returns 10001 bytes in content-length header #10996
Replies: 2 comments
|
|
For a file larger than 10,000 bytes, this request: Range: bytes=-10000means “return the final 10,000 bytes”. Byte ranges are inclusive, but a suffix length is still a length; a compliant partial response should be similar to: HTTP/1.1 206 Partial Content
Content-Range: bytes 1-10000/10001
Content-Length: 10000
Accept-Ranges: bytesSo if your private index returns The missing pieces in the pasted headers are the status and curl -sv \
-H 'Accept-Encoding: identity' \
-H 'Cache-Control: no-cache' \
-H 'Range: bytes=-10000' \
'https://private-index.example/path/package.whl' \
-o /dev/nullInterpret the result as follows:
Run it once against the index's origin and once through the public ingress/reverse proxy. If only the public path is wrong, check CDN/nginx/artifact-repository range handling and whether content encoding is being applied despite There is also a separate maintenance issue: Poetry 1.8.2 is from the unsupported 1.x line, so first reproduce with a current Poetry 2.x release. Upgrading may improve fallback/error handling, but it cannot make a malformed If you share the response status, |
Uh oh!
There was an error while loading. Please reload this page.
Hi all!
poetry 1.8.2
We have a private pypi and an own python package. I specified a source in pyproject.toml. Then I'm trying to install the package.
When request to download the package is being done the next http headers are used (
poetry/src/poetry/inspection/lazy_wheel.py
Line 604 in c459f14
{ 'Accept-Encoding': 'identity', 'Cache-Control': 'no-cache', 'Range': 'bytes=-10000' }The problem is that pypi returns something like this:
I mean the content-length returns one byte more than requested. This causes error:
Is the problem on our private pypi?
All reactions