Re: i37 - Vary and non-existant headers

On tor, 2007-11-15 at 08:51 +0000, Jamie Lokier wrote:

> What about whitespace differences (e.g. leading/trailing whitespace,
> whitespace following the header name colon), multi-line breaks, and
> multiple occurrences of the same header?
> 
> Does exact means _exactly_ in all those respects, or is it acceptable
> for a cache to canonicalise certain things, like converting multiple
> occurences of a header to a single header by joining with ", " (or
> ","), converting multi-line headers to single-line, and stripping
> leading/trailing whitespace from the header value?

Ofcourse there is some canonisation taking place, you can't compare two
sets of headers otherwise as the LWS and list rules allows the exact
same thing to be transmitted in many ways.. But there is no knowledge of
the meaning of any of the headers involved in the process.

The process is spelled out in quite detail in 13.2 Caching Negotiated
Documents, with very little room for error other than implementation
bugs. That's provided one cares to read 13.2 before jumping to
conclusions about how this should work.

Please note that in case of Vary request headers compare it's safe to
err on the cautious side and get false "Vary request" misses. So if you
optimize by doing a string literal compare instead of exact value then
things will still work, just not optimally so..

Regards
Henrik

Received on Thursday, 15 November 2007 13:21:58 UTC