]> Lady’s Gitweb - Gitweb/blobdiff - gitweb.perl
gitweb: remove PATH_INFO from $my_url and $my_uri
[Gitweb] / gitweb.perl
index 5ac2233929773b7cf14348f23a1e2893372a5d9cbaae1f5aba77be68c2561fc4..87c50e6e9f3fc13155de178a21e9125589f9106bbece735b8a0ee4ed8cec6a6b 100755 (executable)
@@ -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";
This page took 0.029321 seconds and 4 git commands to generate.