W3C home > Mailing lists > Public > ietf-http-wg@w3.org > April to June 2013

Re: p6: Returning the freshest response

From: Mark Nottingham <mnot@mnot.net>
Date: Mon, 22 Apr 2013 14:03:12 +1000
Message-Id: <98485D93-5957-4508-B817-90FE7B5BBDA4@mnot.net>
To: "ietf-http-wg@w3.org Group" <ietf-http-wg@w3.org>
Now:
  http://trac.tools.ietf.org/wg/httpbis/trac/ticket/453


On 29/03/2013, at 2:10 PM, Mark Nottingham <mnot@mnot.net> wrote:

> 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/
> 
> 
> 
> 

--
Mark Nottingham   http://www.mnot.net/
Received on Monday, 22 April 2013 04:03:37 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 1 March 2016 11:11:12 UTC