]> Lady’s Gitweb - Gitweb/commitdiff
gitweb: check if HTTP_ACCEPT is really set
authorMatthias Lederhofer <redacted>
Sun, 6 Aug 2006 13:55:02 +0000 (15:55 +0200)
committerLady <redacted>
Mon, 6 Apr 2026 04:05:47 +0000 (00:05 -0400)
Signed-off-by: Matthias Lederhofer <redacted>
Signed-off-by: Junio C Hamano <redacted>
gitweb.perl

index 1736bbbad6d630b39268939a37323e4caf8c42e4aa8aa334721c664e5729bb0b..da3cb0b0420246c1f35869eaff6f7f585756cef4a8f631e5fe909cdec96936f9 100755 (executable)
@@ -856,7 +856,7 @@ sub git_header_html {
        # 'application/xhtml+xml', otherwise send it as plain old 'text/html'.
        # we have to do this because MSIE sometimes globs '*/*', pretending to
        # support xhtml+xml but choking when it gets what it asked for.
-       if ($cgi->http('HTTP_ACCEPT') =~ m/(,|;|\s|^)application\/xhtml\+xml(,|;|\s|$)/ && $cgi->Accept('application/xhtml+xml') != 0) {
+       if (defined $cgi->http('HTTP_ACCEPT') && $cgi->http('HTTP_ACCEPT') =~ m/(,|;|\s|^)application\/xhtml\+xml(,|;|\s|$)/ && $cgi->Accept('application/xhtml+xml') != 0) {
                $content_type = 'application/xhtml+xml';
        } else {
                $content_type = 'text/html';
This page took 0.390742 seconds and 4 git commands to generate.