Re: Content Auto-negotiation

On Oct 19, 2010, at 12:26 PM, William Waites wrote:

> This topic came up in IRC after I was looking at making a small
> CGI script to do autonegotiation and I noticed the Accept header
> send by Google Chrome:
> 
> 	application/xml,application/xhtml+xml,text/html;q=0.9,
>        text/plain;q=0.8,image/png,*/*;q=0.5
> 
> My reading of the RFC (and the new draft) suggests that this 
> would result in image/png being preferred over text/html. 

Yes.

> Someone else believed that the q=0.5 at the end applies to
> both image/png and */* though both the pseudo-BNF grammar
> and one of the examples would appear to contradict this.

They do contradict it.  Accept is an unordered list, which is
why the q values are needed.

> Would appreciate some clarification. Does Chrome really 
> prefer pictures of web pages?

It is just a bug in Chrome.

> Perhaps the new draft would benefit from some more explicit
> treatment of this case to avoid confusion.

No.  I don't think anyone who reads the spec can conclude anything
other than what you did.  People who don't read specs will not be
helped by more words in the spec.

....Roy

Received on Tuesday, 19 October 2010 19:49:10 UTC