aboutsummaryrefslogtreecommitdiff
path: root/gitweb
diff options
context:
space:
mode:
authorMatthias Lederhofer <matled@gmx.net>2006-08-06 15:55:02 +0200
committerJunio C Hamano <junkio@cox.net>2006-08-06 13:40:19 -0700
commitbd943f4757ab1d62d862ea12b4cf8b6b495e115f (patch)
tree7fcf1b0ff5aa64279516da3e3e180e19af37d6d6 /gitweb
parent403ccc4f36101ca5084e659a8c3c9911ccc91de8 (diff)
downloadgit-bd943f4757ab1d62d862ea12b4cf8b6b495e115f.tar.gz
git-bd943f4757ab1d62d862ea12b4cf8b6b495e115f.tar.xz
gitweb: check if HTTP_ACCEPT is really set
Signed-off-by: Matthias Lederhofer <matled@gmx.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'gitweb')
-rwxr-xr-xgitweb/gitweb.perl2
1 files changed, 1 insertions, 1 deletions
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index d0672cde3..5e72b4f61 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -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';