X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=gitweb%2Fgitweb.perl;h=83f810ad46cd2dfcea37308791ba64870ebfbd3c;hb=d5c527448db30be55553e0b125015e8d444f8dbc;hp=da474d082c4422ea2def6a7090ac79ed39eb9d47;hpb=3791f77c28f233df121da2f83abf7eefc7b49b69;p=git.git diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl index da474d082..83f810ad4 100755 --- a/gitweb/gitweb.perl +++ b/gitweb/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"; @@ -775,7 +782,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 { @@ -4070,10 +4077,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 |