Re: i37: Vary and non-existant headers

On 06/05/2009, at 6:08 PM, Julian Reschke wrote:

> Mark Nottingham wrote:
>> On 06/05/2009, at 4:43 PM, Julian Reschke wrote:
>>> Mark Nottingham wrote:
>>>> Looking back at this discussion, I think we have agreement to  
>>>> drop 'present' (as per Roy), and add the "When a resource's  
>>>> representations..." sentence.
>>>
>>> The current text in draft 06 is different from the one that was  
>>> discussed in earlier emails; so I'll have to re-read the thread  
>>> and compare what's in now with what's in RFC 2616...
>> Good point. Current text:
>>> When a cache receives a request that can be satisfied by a stored  
>>> response that includes a Vary header field (Section 3.5), it MUST  
>>> NOT use that response unless all of the selecting request-headers  
>>> in the presented request match the corresponding stored request- 
>>> headers from the original request.
>
> "...selecting request-headers in the presented request..."
>
> What's essential is that this includes also headers *not present* in  
> the request, if the cached response varied on them. For instance, if  
> the cache as a response for a previous request with "Accept- 
> Encoding: gzip", it MUST NOT use that for a subsequent request that  
> lacks an "Accept-Encoding" header.
>
> How about:
>
> "When a cache receives a request that can be satisfied by a stored  
> response that includes a Vary header field (Section 3.5), it MUST  
> NOT use that response unless all of the selecting request-headers  
> stored from the original request match those in the presented  
> request."

Possibly.

How about:

When a cache receives a request that can be satisfied by a stored  
response that includes a Vary header field (Section 3.5), it MUST NOT  
use that response unless all of the selecting request-headers  
nominated by the Vary header match in both the original request  
associated with the stored response, and the presented request.

and adding this to the subsequent paragraph (defining what it means to  
match):

If a header field is absent from a a request, it can only match  
another request if it is also absent there.

> Also, I just noticed that the definition of "selecting headers" now  
> is down in the definition of "Vary". Maybe we should undo this, add  
> a forward reference, or move it into the Terminology section...

Yes, that needs some massaging.


--
Mark Nottingham     http://www.mnot.net/

Received on Wednesday, 6 May 2009 23:48:11 UTC