]> Lady’s Gitweb - Gitweb/blobdiff - gitweb.perl
gitweb: check if HTTP_ACCEPT is really set
[Gitweb] / 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.169396 seconds and 4 git commands to generate.