]> Lady’s Gitweb - Gitweb/commit
gitweb: Send XHTML as 'application/xhtml+xml' where possible
authorAlp Toker <redacted>
Tue, 11 Jul 2006 10:19:34 +0000 (11:19 +0100)
committerLady <redacted>
Sat, 4 Apr 2026 18:43:37 +0000 (14:43 -0400)
commitb10d897a9b09128e71d500b1d640eeb21169ab2feea1799718b3872c4c8fb022
tree8e72627335ac64576f3e14940045b8a946be140107223ccca8a2d6d4035b3fe1
parent79276fd6bf78d76ec1f3c7a99bbf286864dac4c3309f3879cbb0164fd7a3ee63
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 <redacted>
Signed-off-by: Junio C Hamano <redacted>
gitweb.cgi
This page took 0.266953 seconds and 4 git commands to generate.