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

Re: i37: Vary and non-existant headers

From: Jamie Lokier <jamie@shareable.org>
Date: Thu, 7 May 2009 16:51:17 +0100
To: Julian Reschke <julian.reschke@gmx.de>
Cc: Mark Nottingham <mnot@mnot.net>, HTTP Working Group <ietf-http-wg@w3.org>
Message-ID: <20090507155117.GB31746@shareable.org>
Julian Reschke wrote:
> 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."
> 
> ?

No, because it is wrong.  Example:

   Stored original request does not have Accept-Encoding.
   Stored response has "Vary: Accept-Encoding".

   New request has "Accept-Encoding: gzip"
        => Cache MUST NOT use the stored response.

   New request has "Accept-Encoding: deflate"
        => Cache MUST NOT use the stored response.

   New request has "Accept-Encoding:"
        => Cache MUST NOT use the stored response.
 
   New request does not have Accept-Encoding.
        => Cache MAY use the stored response.

The original request's _lack_ of Accept-Encoding header is being
varied on.

The proposed text doesn't make this any clearer than the existing
text, it just moves the ambiguity from missing headers in the new
request to missing headers in the original request.

For each header mentioned in Vary, the value or absence of that header
must be the same for the original and new requests.

Here is proposed replacement:

   "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, for every header identified by the
   stored Vary, the header's value or absence in the original request
   matches its value or absence in the presented request."

(When the stored Vary is "*", _any_ more or fewer headers (except
transport headers?) in the presented request must prevent a match).

-- Jamie
Received on Thursday, 7 May 2009 15:51:54 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 27 April 2012 06:51:02 GMT