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

RE: i37: Vary and non-existant headers

From: Brian Smith <brian@briansmith.org>
Date: Thu, 7 May 2009 12:31:17 -0500
To: "'Julian Reschke'" <julian.reschke@gmx.de>, "'Mark Nottingham'" <mnot@mnot.net>
Cc: "'HTTP Working Group'" <ietf-http-wg@w3.org>
Message-ID: <000301c9cf3f$0671cb60$13556220$@org>
Julian Reschke wrote:
> "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 *stored* Vary header match in both the original request
> associated with the stored response, and the presented request."

This is wrong, but not for the reason Jamie stated.

Consider this:

1. Client requests "GET /foo"
2. Cache forwards the request to the server "GET /foo" with
   an If-None-Match: "A", "B", "C"
3. Server returns "304 Not Modified" with ETag "A".

According to the statement above, the cache could only return the cached
response with ETag "A" if the Vary'd headers match; otherwise, it couldn't
return any response at all. However, the cache must be able to return the
response with ETag "A" regardless of whether the Vary'd headers match.

If all of the Vary'd headers match, then the cache can satisfy the request
without forwarding it on (if it is fresh enough), but otherwise the cache
must forward the request on; which cached response (if any) the cache can
return will be decided by the upstream servers.

- Brian
Received on Thursday, 7 May 2009 18:10:32 GMT

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