gitweb: Send XHTML as 'application/xhtml+xml' where possible
commitf6801d669ee11f0d5e67b2e86aec270d2a225224
authorAlp Toker <alp@atoker.com>
Tue, 11 Jul 2006 10:19:34 +0000 (11 11:19 +0100)
committerJunio C Hamano <junkio@cox.net>
Tue, 11 Jul 2006 21:18:42 +0000 (11 14:18 -0700)
tree18bec3e6e68427152543254dce219ec180175d49
parented0e078f96a96ffe515899ef42051a568be4693a
gitweb: Send XHTML as 'application/xhtml+xml' where possible

"The 'text/html' media type [RFC2854] is primarily for HTML, not for
XHTML. In general, this media type is NOT suitable for XHTML."

This patch makes gitweb use content negotiation to conservatively send
pages as Content-Type 'application/xhtml+xml' when the user agent
explicitly claims to support it.

It falls back to 'text/html' even if the user agent appears to
implicitly support 'application/xhtml+xml' due to a '*/*' glob, working
around an insidious bug in Internet Explorer where sending the correct
media type prevents the page from being displayed.

Signed-off-by: Alp Toker <alp@atoker.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
gitweb/gitweb.cgi