- From: Mark Nottingham <mnot@mnot.net>
- Date: Fri, 29 Mar 2013 14:10:11 +1100
- To: "ietf-http-wg@w3.org Group" <ietf-http-wg@w3.org>
p6 currently says; > When more than one suitable response is stored, a cache must use the most recent response (as determined by the Date header field). https://svn.tools.ietf.org/svn/wg/httpbis/draft-ietf-httpbis/latest/p6-cache.html#constructing.responses.from.caches ... which was sourced pretty directly from 2616: > A correct cache MUST respond to a request with the most up-to-date response held by the cache that is appropriate to the request Interpreted strictly*, this means that if a cache has two fresh representations: Content-Type: image/jpeg Date: Thu, 14 Feb 2013 03:08:09 GMT Content-Type: image/png Date: Thu, 14 Feb 2013 03:08:08 GMT and it gets a request with: Accept: image/jpeg;q=0.1, image/png;q=1.0 then it'll return the JPEG because it's fresher, even though the client clearly prefers the PNG. However that's not the whole story. To get to those multiple responses, the cache goes through the process of winnowing down the potentially matching stored responses, using the process described in <https://svn.tools.ietf.org/svn/wg/httpbis/draft-ietf-httpbis/latest/p6-cache.html#caching.negotiated.responses>. That section says: > If multiple selected responses are available, the most recent response (as determined by the Date header field) is used; see Section 4. which I put into p6 based upon the above. So, I'm wondering if we should change that to something like: """ If multiple selected responses are available, the cache will need to choose one to use. If a selecting header has a known mechanism for doing so (e.g., qvalues on Accept and similar request headers), it MAY be used to select one; otherwise, the most recent response (as determined by the Date header field) is used, as per Section 4. """ Thoughts? * "appropriately" doesn't give us enough leeway here on its own; see the context. -- Mark Nottingham http://www.mnot.net/
Received on Friday, 29 March 2013 03:10:38 UTC