Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
gitweb: check if HTTP_ACCEPT is really set
author
Matthias Lederhofer
<matled@gmx.net>
Sun, 6 Aug 2006 13:55:02 +0000
(15:55 +0200)
committer
Junio C Hamano
<junkio@cox.net>
Sun, 6 Aug 2006 20:40:19 +0000
(13:40 -0700)
Signed-off-by: Matthias Lederhofer <matled@gmx.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
gitweb/gitweb.perl
patch
|
blob
|
history
raw
|
patch
|
inline
| side by side (parent:
403ccc4
)
diff --git
a/gitweb/gitweb.perl
b/gitweb/gitweb.perl
index d0672cde3e713d92ba30d07531e55f1db5d5670c..5e72b4f617401c84464b02625cf4643b411adc49 100755
(executable)
--- 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.
# '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';
$content_type = 'application/xhtml+xml';
} else {
$content_type = 'text/html';