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

XHTML 1.0 Content-Negotiation

From: James Pickering <jp29@cox.net>
Date: Sat, 6 Aug 2005 13:26:45 -0700
Message-ID: <000601c59ac5$2a83e950$0200a8c0@jp29>
To: <www-qa@w3.org>
I am submitting this post IAW with the request for Content-Negotiation techniques for various web servers as outlined at: 

http://www.w3.org/2003/01/xhtml-mimetype/content-negotiation

My Web Service Provider employs the Zeus/3.4 Server which does not recognize MIME-type application/xhtml+xml to associate with XHTML documents. Their Technical Department was not encouraging about effecting Content-Negotiation but I found that inserting the following PHP code ..........

if ( isset($_SERVER["HTTP_ACCEPT"]) and 
stristr($_SERVER["HTTP_ACCEPT"],"application/xhtml+xml") ) {My
header("Content-type: application/xhtml+xml");
}
else {
header("Content-type: text/html");
}

.......... at the beginning of the document as a pre-processor works for the Zeus Server. At least my pages served in this fashion indicate the content type to be application/xhtml+xml when Viewing Page Info. in the Firefox 1.0.6 Browser and as text/html in MSIE 6.0 -- in the same manner as the W3C Home Page.

-- 
James Pickering
http://www.jp29.org/
XHTML served via content-negotiation
Received on Saturday, 6 August 2005 20:26:55 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Sunday, 6 December 2009 12:14:01 GMT