W3C home > Mailing lists > Public > www-qa@w3.org > August 2005

Re: XHTML 1.0 Content-Negotiation

From: Bjoern Hoehrmann <derhoermi@gmx.net>
Date: Sat, 06 Aug 2005 23:02:52 +0200
To: "Jim Ley" <jim@jibbering.com>
Cc: "James Pickering" <jp29@cox.net>, <www-qa@w3.org>
Message-ID: <42f6238f.1972609@smtp.bjoern.hoehrmann.de>

* Jim Ley wrote:
>Unfortunately this is incorrect, and would violate HTTP 1.1, the Accept 
>header is considerably richer in what it can say than the above uses.

Indeed, another typically overlooked case are escape sequences in quoted
strings, for example, Content-Type:text/html;charset="\utf-8" is often
not parsed correctly. The encoding_from_content_type method in my 
gets it right, it's based on on HTTP::Header::Util::split_header_words
neither of which are trivial functions. The Perl module HTTP::Negotiate
http://search.cpan.org/perldoc?HTTP::Negotiate should provide a better
facility here. I gather something similar is available for PHP. Please
don't rely on non-standard code for improved standards-compliance.
Björn Höhrmann · mailto:bjoern@hoehrmann.de · http://bjoern.hoehrmann.de
Weinh. Str. 22 · Telefon: +49(0)621/4309674 · http://www.bjoernsworld.de
68309 Mannheim · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/ 
Received on Saturday, 6 August 2005 21:03:04 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:40:36 UTC