- From: <bugzilla@wiggum.w3.org>
- Date: Fri, 28 Sep 2007 09:11:18 +0000
- To: www-validator-cvs@w3.org
- CC:
http://www.w3.org/Bugs/Public/show_bug.cgi?id=18
------- Comment #17 from dean@55.co.nz 2007-09-28 09:11 -------
> Dean, there is more to content-negotiation than the hack for IE and XHTML. :)
>
> thanks
> olivier
>
The only 'hack' in my content negotiation script is the line where I have to
unnecessarily check for your user-agent as it fails to give my server an accept
header.
if (stristr($_SERVER['HTTP_ACCEPT'], "application/xhtml+xml") ||
/* the line below is an unnecessary hack :) */
stristr($_SERVER["HTTP_USER_AGENT"], "W3C_Validator"))
{
$mime = "application/xhtml+xml";
}
else
{
$mime = "text/html";
}
header("Content-Type: $mime; charset=utf-8");
Thanks
Dean
Received on Friday, 28 September 2007 09:11:26 UTC