- From: David Dorward <david@dorward.me.uk>
- Date: Tue, 31 Jul 2007 23:29:21 +0100
- To: www-validator Community <www-validator@w3.org>
On 31 Jul 2007, at 14:24, Gez Lemon wrote:
> header("Vary: Accept");
> if (stristr($_SERVER[HTTP_ACCEPT], "application/xhtml+xml") === FALSE)
> header("Content-Type: text/html; charset=utf-8");
> else
> header("Content-Type: application/xhtml+xml; charset=utf-8");
Accept: text/html, application/xhtml+xml;q=0 would get an XHTML
content type there.
Just looking for substrings is not a good way of parsing Accept headers.
--
David Dorward
http://dorward.me.uk/
http://blog.dorward.me.uk/
Received on Wednesday, 1 August 2007 08:07:35 UTC