aboutsummaryrefslogtreecommitdiff
path: root/gitweb
diff options
context:
space:
mode:
authorJakub Narebski <jnareb@gmail.com>2006-12-27 23:59:51 +0100
committerJunio C Hamano <junkio@cox.net>2006-12-28 00:57:11 -0800
commit45c9a7583c68ad5d150f40162dab65800124caf2 (patch)
tree5b4e0b9b68b7010f38c8e1195595c9ae9b320538 /gitweb
parent7c20b8234af2962ea4d5ce930ec0308c33f6f654 (diff)
downloadgit-45c9a7583c68ad5d150f40162dab65800124caf2.tar.gz
git-45c9a7583c68ad5d150f40162dab65800124caf2.tar.xz
gitweb: Add mod_perl version string to "generator" meta header
Add mod_perl version string (the value of $ENV{'MOD_PERL'} if it is set) to "generator" meta header. The purpose of this is to identify version of gitweb, now that codepath may differ for gitweb run as CGI script, run under mod_perl 1.0 and run under mod_perl 2.0. Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'gitweb')
-rwxr-xr-xgitweb/gitweb.perl3
1 files changed, 2 insertions, 1 deletions
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index da12be747..a0a614aca 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -1711,6 +1711,7 @@ sub git_header_html {
}
print $cgi->header(-type=>$content_type, -charset => 'utf-8',
-status=> $status, -expires => $expires);
+ my $mod_perl_version = $ENV{'MOD_PERL'} ? " $ENV{'MOD_PERL'}" : '';
print <<EOF;
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
@@ -1719,7 +1720,7 @@ sub git_header_html {
<!-- git core binaries version $git_version -->
<head>
<meta http-equiv="content-type" content="$content_type; charset=utf-8"/>
-<meta name="generator" content="gitweb/$version git/$git_version"/>
+<meta name="generator" content="gitweb/$version git/$git_version$mod_perl_version"/>
<meta name="robots" content="index, nofollow"/>
<title>$title</title>
EOF