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

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.

> 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. 

> 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.

Regards,
Brian

Received on Wednesday, 27 May 2009 01:55:19 UTC