W3C home > Mailing lists > Public > www-validator@w3.org > April 2008

please add Accept header to http request containing application/xhtml+xml

From: Noa Resare <noa@resare.com>
Date: Fri, 18 Apr 2008 09:58:32 +0200
Message-Id: <2317E9C2-5163-49F5-B9FA-53D3454EEE9A@resare.com>
To: www-validator@w3.org
The recommendation to use mime type application/xhtml+xml has the  
problem of not being compatible with for example Internet Explorer 6  
(which has quite a market share)

There are various recommendations about how to work around that at the  
httpd level by adding special rewrite rules handling internet explorer  
as a one off case. However, a better solution IMHO would be to use the  
http request Accept header, looking for the application/xhtml+xml  

This strategy works beautifully with firefox, safarai and Internet  
Explorer, but the w3 validator unfortunately doesn't send any Accept  
headers, which makes a apache httpd server with the rewrite rules  
specified below outputting a warning that the server does send text/ 
html instead of application/xhtml+xml

In other words, adding "Accept: application/xhtml+xml, */*" to the  
requests of the validator would be a nice thing.

My rewrite rules:

RewriteEngine on
RewriteCond %{HTTP_ACCEPT} !application/xhtml\+xml
RewriteCond %{REQUEST_URI} \.xhtml$
RewriteRule .* - [T=text/html]

I guess normalcy is not really our style. -- Juno

Received on Friday, 18 April 2008 21:50:09 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:59:07 UTC