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

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

From: Brian Smith <brian@briansmith.org>
Date: Tue, 26 May 2009 20:54:34 -0500
To: "'Adrien de Croy'" <adrien@qbik.com>, "'HTTP Working Group'" <ietf-http-wg@w3.org>
Message-ID: <000001c9de6e$1b246a70$516d3f50$@org>
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 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 27 April 2012 06:51:03 GMT