Skip to content

headers hang with download resume / range request getting 416 #16

Description

@rakslice

I noticed when doing an apt upgrade on a particular old system it was hanging waiting for headers when trying to get a particular package, and this was repeatable when cancelling and retrying the apt upgrade.

Looking at the proxy-mesh log messages, the client was doing a range request for the deb, presumably to resume a cancelled download from a previous run, and proxy-mesh was getting a 416 (https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/416) from the upstream server.

416 is an error response when the requested range value is actually out of range for the file or otherwise ill-formatted; it should be basically passed back to a client making a range request.

It's not to be confused with the normal range request results:
206 partial content (if the server supports range requests in general and for this resource and is returning just the range)
200 or similar (if not and the server is returning the whole document)

  • proxy-mesh should be fixed to return the 416 to the client promptly

The existence of this particular error scenario means that the file is smaller that the client was expecting, smaller even than the part they already they downloaded -- this never normally happens, so it's fair to ask whether we had actually mixed up resources and served the response for a larger file to the client by mistake earlier

  • I should try some cancelled/resumed download scenarios to see if I can get more that deliver 416s to understand where the problem came from

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions