Closed mpdude closed 2 years ago
The 206 would not contain a Vary: Range because the selected representation in not influenced by Range -- only the content extracted from that representation. And, yes, caches have to know that in order to make use of 206 responses.
Oh, I was not aware of that distinction between selecting a representation and the content extracted from it. A good opportunity to go back and re-read the spec :-).
I also overlooked that, apart from other requirements that must be met, caches must understand the particular response codes in order to be allowed to cache them, not just cache "any 2xx code that is cacheable". And already RFC 2616 mentioned that 206 responses must not be cached unless Range
and Content-Range
are understood.
Thank you!
Dear httpwg,
congratulations on completing RFC 9110 and thank you for your efforts put into it! You've added a dedicated section for Range Requests, and I have a question on that.
In section 15.3.7, it says:
Assume I have a response with code 200 that is either heuristically cacheable or has an explicit cache-control header, but does not contain a
Vary
header.What should happen if the client performs the same request again, but this time includes a
Range
header?Should the 206 contain
Vary: Range
, since the body of the response depends on (and changes with) this value? Or are caches supposed to know about the special semantics of 206 themselves and takeRange
into account accordingly?