- From: Brian Smith <brian@briansmith.org>
- Date: Wed, 14 Oct 2009 02:38:38 -0500
- To: "'Mark Nottingham'" <mnot@mnot.net>
- Cc: "'HTTP Working Group'" <ietf-http-wg@w3.org>
Mark Nottingham wrote: > On 14/10/2009, at 5:51 PM, Brian Smith wrote: > > If a 302/303/307 response doesn't contain an Expires header or a > > Cache-Control header, then it isn't cacheable. That is clear. But, > > if the > > response contains *any* Expires header, does that make it cacheable? > > You're conflating "can be stored in a cache" with "can be served from > cache". "cacheable" was used for both in 2616, often in a self- > conflicting way. What we're currently trying to do is untangle them. Gotcha. So, you could just remove all the sentences from Part 2, Section 8 containing the word "cacheable," because Part 6, section 2.3.1.1 (Calculating Heuristic Freshness) already describes the requirements precisely. Is that correct? That does make sense to me. I think that 201 and 304 responses cannot be stored in cache, ever, because they use the ETag header for a different purpose than for supporting conditional GET, so you cannot validate them with the origin server. Similarly, does it make sense to cache 405 Method Not Allowed responses to POST requests, so that they could be returned for a subsequent GET request? Similarly, POST responses 411 Length Required, 413 Request Entity Too Large, and 415 Unsupported Media Type responses subsequent GET requests. Also, 417 Expectation Failed is basically a "hop-by-hop status code" since it only makes sense when an unsupported value for a hop-by-hop request header field is provided by the cache to the server. Finally, note the following statement in Part 2, Section 4: "However, applications MUST understand the class of any status code, as indicated by the first digit, and treat any unrecognized response as being equivalent to the x00 status code of that class, with the exception that an unrecognized response MUST NOT be cached." Here, I think "MUST NOT be cached" means specifically "MUST NOT be stored in caches." I think Part 6 should mention this requirement explicitly. Regards, Brian
Received on Wednesday, 14 October 2009 07:39:08 UTC