-
Notifications
You must be signed in to change notification settings - Fork 101
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
"Range" vs. "Content-Range" #2
Comments
@awendt thank you so much for this feedback, these are good points indeed! Regarding the
This makes me think that the
It's a simular situation as for the
I actually think that the http specification generally does not distinguish between request/response headers, and many headers make sense for both (e.g. What do you think? |
More thoughts on this here: https://news.ycombinator.com/reply?id=5564024&whence=item%3fid%3d5563569 |
I believe this statement is referring to the different types of entities (say a text entity vs a binary image entity), all of which can be meaningfully sampled with a range of bytes. It's not saying the range header can apply to both message types (request messages and response messages). An entity is the payload of a message - they're not the same thing. If you look at the ABNF grammar for a response, you'll see that request-headers are clearly not permitted there. If Range was meant to be applicable to both request and response messages, it would have been included in the entity-header set.
The headers that apply to both are either general-headers or entity-headers. |
More prior art and discussion here: http://www.tus.io/protocols/resumable-upload.html#comment-866226341 |
I think we have to figure out PUT vs PATCH first, as that may have an impact on the headers to use. Also see: #14 (comment) |
I think the HTTPbis edits have clarified this a bit. Range: http://tools.ietf.org/html/draft-ietf-httpbis-p5-range-22#section-3.1 Per this document, Range should be used for GET requests and Content-Range should be used for partial responses. It also states that a server MUST ignore the Range header for requests other than GET. (Going against this will BREAK THE WHOLE INTERNET or something.) This means it would be up to this group to define a custom header for writing partial byte ranges to the server OR language that repurposes Content-Range as a request header. The latter might be a-okay. |
Latest status on this discussion is summarized here. |
The project settled with the custom |
"Range" is a request header for GET requests in section 14.35 of the HTTP/1.1 spec:
On the other hand, "Content-Range" in section 14.16 of the spec is a response header field:
Why do you use "Range" for the response and "Content-Range" for the request?
The text was updated successfully, but these errors were encountered: