W3C home > Mailing lists > Public > ietf-http-wg@w3.org > January to March 2013

Re: #428 Accept-Language ordering for identical qvalues

From: Adrien W. de Croy <adrien@qbik.com>
Date: Tue, 22 Jan 2013 11:13:37 +0000
To: "Amos Jeffries" <squid3@treenet.co.nz>, "ietf-http-wg@w3.org" <ietf-http-wg@w3.org>
Message-Id: <emd9a7e252-b68d-47ac-991e-6dbc843de358@bombed>

13.6 para 3 & 4

"When the cache receives a subsequent request whose Request-URI
specifies one or more cache entries including a Vary header field,
the cache MUST NOT use such a cache entry to construct a response to
the new request unless all of the selecting request-headers present
in the new request match the corresponding stored request-headers in
the original request.

The selecting request-headers from two requests are defined to match
if and only if the selecting request-headers in the first request can
be transformed to the selecting request-headers in the second request
by adding or removing linear white space (LWS) at places where this
is allowed by the corresponding BNF, and/or combining multiple
message-header fields with the same field name following the rules
about message headers in section 4.2. "

Cheers

Adrien

------ Original Message ------
From: "Amos Jeffries" <squid3@treenet.co.nz>
To: "ietf-http-wg@w3.org" <ietf-http-wg@w3.org>
Sent: 22/01/2013 11:24:52 p.m.
Subject: Re: #428 Accept-Language ordering for identical qvalues
>On 22/01/2013 10:30 p.m., Adrien W. de Croy wrote:
>>Just wondering if there is anything to be discussed about 
>>Accept-Encoding.
>>There are some cases where it can cause issues for a cache.
>>for example
>>GET /something HTTP/1.1
>>Host: somewhere.com
>>Accept-Encoding: gzip, deflate
>>200 OK HTTP/1.1
>>Content-Encoding: gzip
>>Cache-Control: max-age=2000000
>>Vary: Accept-Encoding
>>GET /something HTTP/1.1
>>Host: somewhere.com
>>Accept-Encoding: deflate, gzip
>>cache MUST NOT select 1st response due to difference in 
>>Accept-Encoding header between requests. Even though there's arguably 
>>no semantic difference.
>
>I'm interested in where that "MUST NOT" comes from. My understanding 
>was that in the cache role we could take the Content-Encoding header on 
>the stored reply as the variant key on the vary response to match 
>against the new client Accept-Encoding entries and serve up the HIT if 
>we really wanted to.
>
>>I've never seen a q value on Accept-Encoding, and the spec talks about 
>>transforming headers as part of matching, but it only allows adding / 
>>removal of LWS and combining multiples. Not re-ordering.
>>I know there's the pathological case about something returning the 
>>headers of the request, but it seems like a big price to pay for this.
>>Maybe all browser vendors should always order Accept-Encoding tokens 
>>in the same order.
>>
>
>But this is a case of a metric where the browser agent *can* usually 
>determine ordering automatically.
>
>For example; deflate, gzip, and friends have different CPU consumption 
>and bandwidth saving profiles. The browser can get access to the 
>clients own CPU and uplink properties to determine whether it needs to 
>proritize deflate,gzip or gzip,deflate. Having both indicated shows 
>that either format response is acceptible, but the more responses this 
>client gets in the first-listed entry the better the user experience.
>
>Amos
>
Received on Tuesday, 22 January 2013 11:14:31 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 22 January 2013 11:14:36 GMT