Inedo Community Forums Forums
    • Recent
    • Tags
    • Popular
    • Login

    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

    Scheduled Pinned Locked Moved Support
    1 Posts 1 Posters 1 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • J Offline
      joris.guex
      last edited by

      Hello,

      We are seeing an issue where we are trying to download files from a ProGet asset directory using wget's --continue flag 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-Range header 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/1000
      

      While 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/1000
      

      Similarly, 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/1000
      

      While 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 Satisfiable
      

      Looking 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, not 1000.

      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

      1 Reply Last reply Reply Quote 0

      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
      • 1 / 1
      • First post
        Last post
      Inedo Website Home • Support Home • Code of Conduct • Forums Guide • Documentation