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>
This commit is contained in:
parent
7c20b8234a
commit
45c9a7583c
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user