Welcome to the Inedo Forums! Check out the Forums Guide for help getting started.
If you are experiencing any issues with the forum software, please visit the Contact Form on our website and let us know!
Invalid Content-Range header for HTTP range requests when downloading files from asset directories
-
Hello,
We are seeing an issue where we are trying to download files from a ProGet asset directory using wget's
--continueflag but wget is returning with exit code 4.We think we have tracked it down to the following issue:
ProGet appears to be returning an invalid
Content-Rangeheader for HTTP range requests.For example, for a file with a total length of 1000 bytes, where 500 bytes have already been downloaded, ProGet returns:
$ wget --server-response --continue --tries 1 https://<PROGET_URL>/endpoints/assets/content/example_file HTTP/1.1 206 Partial Content Content-Range: bytes 500-1000/1000While other HTTP servers (tested with
uv run --with rangehttpserver -m RangeHTTPServer) returns the following:$ wget --server-response --continue --tries 1 http://0.0.0.0:8000/example_file HTTP/1.0 206 Partial Content Content-Range: bytes 500-999/1000Similarly, for a file with a total length of 1000 bytes, which has already been fully downloaded, ProGet returns:
$ wget --server-response --continue --tries 1 https://<PROGET_URL>/endpoints/assets/content/example_file HTTP/1.1 206 Partial Content Content-Range: bytes: 1000-1000/1000While other HTTP servers returns the following:
$ wget --server-response --continue --tries 1 http://0.0.0.0:8000/example_file HTTP/1.0 416 Requested Range Not SatisfiableLooking at https://datatracker.ietf.org/doc/html/rfc9110#name-content-range, I think the current behaviour is incorrect as byte positions are zero-based. In this case the last valid byte should be
999, not1000.Curl seems to ignore this issue, but we are using bitbake which does not allow easily swapping out wget for curl so this is not a solution for us.
Has anyone else seen this, or is there a known fix/workaround?
Thanks,
Joris
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login