Re: relative weights of different Accept-* headers in content negotiation

Brian Smith wrote:
> Adrien de Croy wrote:
>   
>> So, the client is indicating a preference for US english and gzipped.
>> We've got one gzipped, and the other in US english. How do we determine
>> which is the best one?
>>     
>
> Part 6 Section 2.6:
>
>    Caches MUST use the most recent response (as determined by the Date
>    header) when more than one suitable response is stored.  They can
>    also forward a request with "Cache-Control: max-age=0" or "Cache-
>    Control: no-cache" to disambiguate which response to use.
>
>   
OK, thanks for that.  I guess that will lead to some unexpected 
behaviour in some cases (as far as a browser user is concerned), since a 
user could end up getting content in an unexpected (but not unwilling to 
accept, albeit at a very low q value) language purely because it is fresher.

Hence my comment on this in a previous mail.  By choosing Date as the 
ultimate disambiguator, we are effectively stating that Date is the most 
important dimension.  Lots of customers would disagree with that, but I 
guess this will affect very very few people.

>> If we are to accumulate an aggregate score for each stored
>> representation, we'll end up with the same score for both unless we
>> weight the headers.
>>     
>
> Caches treat the Accept headers exactly the same as any other request
> header. Only origin servers (and non-transparent proxies) interpret the
> Accept header contents. 
>
>   
OK, my example should have referred to a non-transparent proxy actually 
since this is what I'm implementing the cache for at the moment. 

So it's a shared cache scenario.  It can't be legal to send gzipped 
content to a UA that didn't advertise support for it, so the proxy 
therefore must consider Accept-* headers.

>> Is there any de-facto standard or BCP for preference of one Accept-*
>> header over another?   Or is it up to the server / cache to pick a
>> representation to serve from other means?
>>     
>
> Polite servers will put some effort into choosing the most acceptable
> response based on the client's preferences. However, servers aren't required
> to be polite; they may ignore any/all parts of any/all Accept headers.
>
>   
thanks

Adrien


> Regards,
> Brian
>
>
>
>   

-- 
Adrien de Croy - WinGate Proxy Server - http://www.wingate.com

Received on Wednesday, 27 May 2009 02:07:48 UTC