W3C home > Mailing lists > Public > ietf-http-wg@w3.org > October to December 2007

Re: i37 - Vary and non-existant headers

From: Henrik Nordstrom <henrik@henriknordstrom.net>
Date: Thu, 15 Nov 2007 02:39:59 +0100
To: Adrien de Croy <adrien@qbik.com>
Cc: "'HTTP Working Group'" <ietf-http-wg@w3.org>
Message-Id: <1195090799.30372.56.camel@henriknordstrom.net>
On ons, 2007-11-14 at 17:11 +1300, Adrien de Croy wrote:

> IMO the condition for a match depends on the meaning of the header.  In 
> general if a header in a Vary tag advertises a capability, and has any 
> possible values which are optional under the spec, then lack of the 
> header would need to be deemed a mis-match, otherwise the cache would be 
> assuming that an optional capability was available at the UA where it 
> was not advertised.  Where the header advertises a restriction, then 
> lack of an advertised restriction should be deemed lack of the 
> restriction.  Where the definition of the header explicitly states how 
> to handle lack of the header, then this overrides.

No. Vary indicates the headers the server used / looked for when
determinig which variant to satisfy the request with, telling caches
which headers it must account for when comparing requests.

A request not having a certain header is a valid data point, and only
matches other requests not having that header.

> For instance, an Accept-Language header is a way for a UA to indicate 
> what languages it is prepared to accept.  Absence of this header IMO 
> indicates that the UA is prepared to accept any language, and that 
> therefore if a cached entity had "Accept-Language" in its Vary header, 
> then this would match.  An alternative view could be that absence of a 
> header implies a default value, e.g. English, and so if the stored 
> entity was not English, this would not match.  Personally I believe in 
> this case that lack of advertisement of a restriction implies lack of 
> the restriction.

Vary and the cache rules around Vary do not care about semantics of
headers. Just their existence and value.  Vary is a selector telling
caches which headers of the request need to be included in the
comparison when comparing two requests. 

The logic actually selecting the correct variant depending on the
request content is all deferred to the web server, except when there is
exact matches filtered by Vary.


Received on Thursday, 15 November 2007 01:40:20 UTC

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