Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve Range support #298

Merged
merged 1 commit into from
Apr 18, 2022
Merged

Conversation

jeffr-spire
Copy link
Contributor

Fix the last-byte-pos value in Content-Range response
Return 416 Range Not Satisfiable if the range is beyond the file size


The Content-range header being generated was invalid; the
last-byte-pos was equal to the complete-length. Especially notable was
that wget -c would fail on range requests.

#239 may be caused by this same issue.

From https://httpwg.org/specs/rfc7233.html#header.content-range:

A Content-Range field value is invalid if it contains a byte-range-resp that has a last-byte-pos value less than its first-byte-pos value, or a complete-length value less than or equal to its last-byte-pos value.

Fix the last-byte-pos value in Content-Range response
Return 416 Range Not Satisfiable if the range is beyond the file size
@davidmoreno davidmoreno merged commit e4305dd into davidmoreno:master Apr 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants