{"thread":{"id":"14824","subject":"[PATCH] gitweb: remove PATH_INFO from $my_url and $my_uri","startedAt":"2008-08-03T18:02:25Z","lastAt":"2008-08-03T19:10:45Z","messageCount":2,"participants":["Giuseppe Bilotta","Petr Baudis"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"86090","messageId":"1217786545-30685-1-git-send-email-giuseppe.bilotta@gmail.com","threadId":"14824","inReplyTo":null,"subject":"[PATCH] gitweb: remove PATH_INFO from $my_url and $my_uri","fromName":"Giuseppe Bilotta","fromEmail":"giuseppe.bilotta@gmail.com","sentAt":"2008-08-03T18:02:25Z","receivedAt":"2008-08-03T18:02:25Z","isPatch":true,"sender":{"key":"giuseppe.bilotta@gmail.com","avatar":"https://avatars.githubusercontent.com/u/1464?v=4"},"body":"This patch (combined with appropriate server configuration) allows usage\nof the gitweb CGI script as DirectoryIndex for the server root even when\nthe pathinfo feature is enabled.\n\nSigned-off-by: Giuseppe Bilotta <giuseppe.bilotta@gmail.com>\n---\n gitweb/gitweb.perl |    4 ++++\n 1 files changed, 4 insertions(+), 0 deletions(-)\n\ndiff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl\nindex ba1f71b..9c8bcab 100755\n--- a/gitweb/gitweb.perl\n+++ b/gitweb/gitweb.perl\n@@ -26,6 +26,10 @@ our $cgi = new CGI;\n our $version = \"++GIT_VERSION++\";\n our $my_url = $cgi->url();\n our $my_uri = $cgi->url(-absolute => 1);\n+if (my $path_info = $ENV{\"PATH_INFO\"}) {\n+\t$my_url =~ s,$path_info$,,;\n+\t$my_uri =~ s,$path_info$,,;\n+}\n \n # core git executable to use\n # this can just be \"git\" if your webserver has a sensible PATH\n-- \n1.5.6.3\n"},{"id":"86094","messageId":"20080803191045.GZ32184@machine.or.cz","threadId":"14824","inReplyTo":"1217786545-30685-1-git-send-email-giuseppe.bilotta@gmail.com","subject":"Re: [PATCH] gitweb: remove PATH_INFO from $my_url and $my_uri","fromName":"Petr Baudis","fromEmail":"pasky@suse.cz","sentAt":"2008-08-03T19:10:45Z","receivedAt":"2008-08-03T19:10:45Z","isPatch":true,"sender":{"key":"pasky@ucw.cz","avatar":"https://avatars.githubusercontent.com/u/18439?v=4"},"body":"On Sun, Aug 03, 2008 at 08:02:25PM +0200, Giuseppe Bilotta wrote:\n> This patch (combined with appropriate server configuration) allows usage\n> of the gitweb CGI script as DirectoryIndex for the server root even when\n> the pathinfo feature is enabled.\n> \n> Signed-off-by: Giuseppe Bilotta <giuseppe.bilotta@gmail.com>\n\nAcked-by: Petr Baudis <pasky@suse.cz>\n\n(In case anyone is wondering, on repo.or.cz I used to just override\n$my_uri manually from the config file.)\n"}]}