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

parseByteRanges support for unsatisfied ranges #87

Open
joeyh opened this issue Apr 6, 2018 · 0 comments
Open

parseByteRanges support for unsatisfied ranges #87

joeyh opened this issue Apr 6, 2018 · 0 comments

Comments

@joeyh
Copy link

joeyh commented Apr 6, 2018

parseByteRanges cannot parse a response like ("Content-Range","bytes */10000")

This can occur when a server does not support a requested range. In particular, I was resuming the download of a file, but the whole file was already actually downloaded. The server responds with partialContent206 and parsing the Content-Range header is the only way to detect if the whole file was already downloaded.

This is called an "unsatisfied-range" in the HTTP RFC, and says it SHOULD be used for a 206 response (leaving open the possibility that some servers send one of the other range formats). None of the ByteRange constructors seem appropriate to parse that into, so it seems that would need a new ByteRangeUnsatisfied constructor.

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

No branches or pull requests

1 participant