X-Git-Url: https://git.ladys.computer/Gitweb/blobdiff_plain/2a8ab3c4d1bcb71a93cc7cca5a22dcd00a37e9f00c62b1e8a8b94cf474b7d9ee..2227b26fd5b74588a606f09e023afd8e9afc2e832561822ce557fc4409e60e2e:/gitweb.perl diff --git a/gitweb.perl b/gitweb.perl index 2efd437..e1aaefc 100755 --- a/gitweb.perl +++ b/gitweb.perl @@ -27,6 +27,13 @@ our $version = "++GIT_VERSION++"; our $my_url = $cgi->url(); our $my_uri = $cgi->url(-absolute => 1); +# if we're called with PATH_INFO, we have to strip that +# from the URL to find our real URL +if (my $path_info = $ENV{"PATH_INFO"}) { + $my_url =~ s,\Q$path_info\E$,,; + $my_uri =~ s,\Q$path_info\E$,,; +} + # core git executable to use # this can just be "git" if your webserver has a sensible PATH our $GIT = "++GIT_BINDIR++/git"; @@ -776,7 +783,7 @@ sub quot_cec { ); my $chr = ( (exists $es{$cntrl}) ? $es{$cntrl} - : sprintf('\%03o', ord($cntrl)) ); + : sprintf('\%2x', ord($cntrl)) ); if ($opts{-nohtml}) { return $chr; } else { @@ -4066,10 +4073,10 @@ sub git_summary { print "
| description | " . esc_html($descr) . " |
| owner | " . esc_html($owner) . " |
| description | " . esc_html($descr) . " |
| owner | " . esc_html($owner) . " |
| last change | $cd{'rfc2822'} |
| last change | $cd{'rfc2822'} |
| $url_tag | $git_url |
| $url_tag | $git_url |