W3C home > Mailing lists > Public > www-validator@w3.org > November 2007

[Suggestion] Wrong environment variable specified when validating ($_SERVER['http-accept])

From: David Coll <david.coll.78@gmail.com>
Date: Fri, 2 Nov 2007 04:57:54 +0100
Message-ID: <74C3D29D3092431AB23CAFD45FCF6BC4@PC0722051C6846F>
To: <www-validator@w3.org>
The exemple of what I'm discussing can be seen here : http://tecfa.unige.ch/perso/maltt/davidco0/ 

When declaring the Mime-type of a document as " application/xhtml+xml ", IE7 will ask you if he must save the document or else.. Well, he is just NOT recognising this mime-type as a web document.. You're probably aware of that..

So the solution I've found was to use the PHP environment variable $_SERVER['http-accept] to determine wheter or not my pages should be declared variable " application/xhtml+xml " or "text/html". Indeed, this variable specify in Opera and Firefox if the value " application/xhtml+xml ", which IE does not.

Your validator is displaying a warning concerning the mime-type because it is not sending that request. 

The suggestion is simply to add it in your request headers ^_^

Thanks

David Coll
Received on Friday, 2 November 2007 22:17:28 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 25 April 2012 12:14:26 GMT