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

relative weights of different Accept-* headers in content negotiation

From: Adrien de Croy <adrien@qbik.com>
Date: Wed, 27 May 2009 13:43:03 +1200
Message-ID: <4A1C9AA7.3000902@qbik.com>
To: HTTP Working Group <ietf-http-wg@w3.org>

Hi all

The content negotiation headers all have q values in them to indicate 
preference.  This leads to dilemmas in certain situations.

E.g. A cache has 2 representations of a URI:

one contains
Content-Language: en-nz
Content-Encoding: gzip

other contains
Content-Language: en-us

both are fresh and allowed to be returned.  It then gets a request for 
the URI which includes

Accept-Language: en-us, en; q=0.8
Accept-Encoding: gzip, *;q=0.8

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?

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.

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?



Adrien de Croy - WinGate Proxy Server - http://www.wingate.com
Received on Wednesday, 27 May 2009 01:40:25 UTC

This archive was generated by hypermail 2.4.0 : Thursday, 2 February 2023 18:43:19 UTC