relative weights of different Accept-* headers in content negotiation

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?

Thanks

Adrien

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

Received on Wednesday, 27 May 2009 01:40:25 UTC