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>
Jakub Narebski committed
Dec 27, 2006 at 23:59 UTC
45c9a7583c68ad5d150f40162dab65800124caf2
1 file changed
+2
-1
gitweb/gitweb.perl
+2
-1
@@ -1711,6 +1711,7 @@ sub git_header_html {
1711
}
1712
print $cgi->header(-type=>$content_type, -charset => 'utf-8',
1713
-status=> $status, -expires => $expires);
1714
+ my $mod_perl_version = $ENV{'MOD_PERL'} ? " $ENV{'MOD_PERL'}" : '';
1715
print <<EOF;
1716
<?xml version="1.0" encoding="utf-8"?>
1717
<!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 {
1720
<!-- git core binaries version $git_version -->
1721
<head>
1722
<meta http-equiv="content-type" content="$content_type; charset=utf-8"/>
1722
-<meta name="generator" content="gitweb/$version git/$git_version"/>
1723
+<meta name="generator" content="gitweb/$version git/$git_version$mod_perl_version"/>
1724
<meta name="robots" content="index, nofollow"/>
1725
<title>$title</title>
1726
EOF