{"thread":{"id":"5763","subject":"[PATCH] gitweb: start to generate PATH_INFO URLs","startedAt":"2006-09-29T22:16:41Z","lastAt":"2006-10-07T08:40:47Z","messageCount":19,"participants":["Martin Waitz","Junio C Hamano","Jakub Narebski","Petr Baudis"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"28016","messageId":"20060929221641.GC2871@admingilde.org","threadId":"5763","inReplyTo":null,"subject":"[PATCH] gitweb: start to generate PATH_INFO URLs","fromName":"Martin Waitz","fromEmail":"tali@admingilde.org","sentAt":"2006-09-29T22:16:41Z","receivedAt":"2006-09-29T22:16:41Z","isPatch":true,"sender":{"key":"tali@admingilde.org","avatar":"https://gravatar.com/avatar/3f89b03eee362187effabe257898735b475673a12265c398ea9161259ae91553?d=mp&s=160"},"body":"Instead of providing the project as a ?p= parameter it is simply appended\nto the base URI.\nAll other parameters are appended to that, except for ?a=summary which\nis the default and can be omitted.\n\nSigned-off-by: Martin Waitz <tali@admingilde.org>\n---\n gitweb/gitweb.perl |   15 ++++++++++++++-\n 1 files changed, 14 insertions(+), 1 deletions(-)\n\ndiff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl\nindex 597d29f..e507ce9 100755\n--- a/gitweb/gitweb.perl\n+++ b/gitweb/gitweb.perl\n@@ -355,6 +355,7 @@ ## action links\n \n sub href(%) {\n \tmy %params = @_;\n+\tmy $href;\n \n \tmy @mapping = (\n \t\tproject => \"p\",\n@@ -373,6 +374,16 @@ sub href(%) {\n \n \t$params{'project'} = $project unless exists $params{'project'};\n \n+\t# first encode base url and project\n+\t$href = \"$my_uri/$params{'project'}\";\n+\tdelete $params{'project'};\n+\n+\t# Summary just uses the project path URL\n+\tif ($params{'action'} eq 'summary') {\n+\t\treturn $href;\n+\t}\n+\n+\t# now encode the parameters explicitly\n \tmy @result = ();\n \tfor (my $i = 0; $i < @mapping; $i += 2) {\n \t\tmy ($name, $symbol) = ($mapping[$i], $mapping[$i+1]);\n@@ -380,7 +391,9 @@ sub href(%) {\n \t\t\tpush @result, $symbol . \"=\" . esc_param($params{$name});\n \t\t}\n \t}\n-\treturn \"$my_uri?\" . join(';', @result);\n+\t$href .= \"?\" . join(';', @result);\n+\n+\treturn $href;\n }\n \n \n-- \n1.4.2.gb8b6b\n\n-- \nMartin Waitz\n"},{"id":"28018","messageId":"7v8xk2jofc.fsf@assigned-by-dhcp.cox.net","threadId":"5763","inReplyTo":"20060929221641.GC2871@admingilde.org","subject":"Re: [PATCH] gitweb: start to generate PATH_INFO URLs","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2006-09-29T22:30:47Z","receivedAt":"2006-09-29T22:30:47Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Martin Waitz <tali@admingilde.org> writes:\n\n> Instead of providing the project as a ?p= parameter it is simply appended\n> to the base URI.\n> All other parameters are appended to that, except for ?a=summary which\n> is the default and can be omitted.\n\nSupporting PATH_INFO in the sense that we do sensible things\nwhen we get called with one is one thing, but generating such a\nURL that uses PATH_INFO is a different thing.  I suspect not\neverybody's webserver is configured to call us with PATH_INFO,\nso this should be conditional.\n"},{"id":"28030","messageId":"20060930181408.GD2871@admingilde.org","threadId":"5763","inReplyTo":"7v8xk2jofc.fsf@assigned-by-dhcp.cox.net","subject":"Re: [PATCH] gitweb: start to generate PATH_INFO URLs","fromName":"Martin Waitz","fromEmail":"tali@admingilde.org","sentAt":"2006-09-30T18:14:09Z","receivedAt":"2006-09-30T18:14:09Z","isPatch":true,"sender":{"key":"tali@admingilde.org","avatar":"https://gravatar.com/avatar/3f89b03eee362187effabe257898735b475673a12265c398ea9161259ae91553?d=mp&s=160"},"body":"hoi :)\n\nOn Fri, Sep 29, 2006 at 03:30:47PM -0700, Junio C Hamano wrote:\n> Martin Waitz <tali@admingilde.org> writes:\n> \n> > Instead of providing the project as a ?p= parameter it is simply appended\n> > to the base URI.\n> > All other parameters are appended to that, except for ?a=summary which\n> > is the default and can be omitted.\n> \n> Supporting PATH_INFO in the sense that we do sensible things\n> when we get called with one is one thing, but generating such a\n> URL that uses PATH_INFO is a different thing.  I suspect not\n> everybody's webserver is configured to call us with PATH_INFO,\n> so this should be conditional.\n\nright, and in fact it was more intended as a RFC, to see what\npeople think about such a thing.  Obviously I wanted to have\nit for my repository, so I implemented it unconditional first.\n\nShould we use the gitweb feature mechanism to enable/disable\nPATH_INFO URL generation?\n\n-- \nMartin Waitz\n"},{"id":"28031","messageId":"7vfye9dtv7.fsf@assigned-by-dhcp.cox.net","threadId":"5763","inReplyTo":"20060930181408.GD2871@admingilde.org","subject":"Re: [PATCH] gitweb: start to generate PATH_INFO URLs","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2006-09-30T19:42:04Z","receivedAt":"2006-09-30T19:42:04Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Martin Waitz <tali@admingilde.org> writes:\n\n> Should we use the gitweb feature mechanism to enable/disable\n> PATH_INFO URL generation?\n\nThat sounds sensible.  I personally do not think many people\nwould object if you made the default to true.  Also I do not\nthink it would make much sense to make this overridable by\nrepository configuration.\n"},{"id":"28091","messageId":"20061001215748.GG2871@admingilde.org","threadId":"5763","inReplyTo":"7vfye9dtv7.fsf@assigned-by-dhcp.cox.net","subject":"[PATCH] gitweb: start to generate PATH_INFO URLs.","fromName":"Martin Waitz","fromEmail":"tali@admingilde.org","sentAt":"2006-10-01T21:57:48Z","receivedAt":"2006-10-01T21:57:48Z","isPatch":true,"sender":{"key":"tali@admingilde.org","avatar":"https://gravatar.com/avatar/3f89b03eee362187effabe257898735b475673a12265c398ea9161259ae91553?d=mp&s=160"},"body":"Instead of providing the project as a ?p= parameter it is simply appended to\nthe base URI.  All other parameters are appended to that, except for ?a=summary\nwhich is the default and can be omitted.\n\nThe old URL generation can be selected by disabling the \"pathinfo\" feature\nin gitweb_config.perl.\n\nSigned-off-by: Martin Waitz <tali@admingilde.org>\n---\n gitweb/gitweb.perl |   22 +++++++++++++++++++++-\n 1 files changed, 21 insertions(+), 1 deletions(-)\n\ndiff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl\nindex 597d29f..edbd3ea 100755\n--- a/gitweb/gitweb.perl\n+++ b/gitweb/gitweb.perl\n@@ -102,6 +102,10 @@ our %feature = (\n \t\t'sub' => \\&feature_pickaxe,\n \t\t'override' => 0,\n \t\t'default' => [1]},\n+\n+\t'pathinfo' => {\n+\t\t'override' => 0,\n+\t\t'default' => [1]},\n );\n \n sub gitweb_check_feature {\n@@ -355,6 +359,7 @@ ## action links\n \n sub href(%) {\n \tmy %params = @_;\n+\tmy $href = $my_uri;\n \n \tmy @mapping = (\n \t\tproject => \"p\",\n@@ -373,6 +378,19 @@ sub href(%) {\n \n \t$params{'project'} = $project unless exists $params{'project'};\n \n+\tmy ($use_pathinfo) = gitweb_check_feature('pathinfo');\n+\tif ($use_pathinfo) {\n+\t\t# use PATH_INFO for project name\n+\t\t$href .= \"/$params{'project'}\" if defined $params{'project'};\n+\t\tdelete $params{'project'};\n+\n+\t\t# Summary just uses the project path URL\n+\t\tif (defined $params{'action'} && $params{'action'} eq 'summary') {\n+\t\t\tdelete $params{'action'};\n+\t\t}\n+\t}\n+\n+\t# now encode the parameters explicitly\n \tmy @result = ();\n \tfor (my $i = 0; $i < @mapping; $i += 2) {\n \t\tmy ($name, $symbol) = ($mapping[$i], $mapping[$i+1]);\n@@ -380,7 +398,9 @@ sub href(%) {\n \t\t\tpush @result, $symbol . \"=\" . esc_param($params{$name});\n \t\t}\n \t}\n-\treturn \"$my_uri?\" . join(';', @result);\n+\t$href .= \"?\" . join(';', @result) if scalar @result;\n+\n+\treturn $href;\n }\n \n \n-- \n1.4.2.gb8b6b\n\n-- \nMartin Waitz\n"},{"id":"28151","messageId":"eftk98$2ii$2@sea.gmane.org","threadId":"5763","inReplyTo":"20060929221641.GC2871@admingilde.org","subject":"Re: [PATCH] gitweb: start to generate PATH_INFO URLs","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2006-10-03T12:16:05Z","receivedAt":"2006-10-03T12:16:05Z","isPatch":true,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"Martin Waitz wrote:\n\n> Instead of providing the project as a ?p= parameter it is simply appended\n> to the base URI.\n\nI have just modified href() to be able to use it for actions which don't\nneed the ?p= parameter... and you didn't take into consideration the case\nwhen $params{'project'} is set, but undefined. Undefined params don't get\nadded, but \"unless exists $params{'project'}\" in the\n\n        $params{'project'} = $project unless exists $params{'project'};\n\nline prevents of adding 'p' param.\n\nIt is important for the project list (and equivalent) views.\n-- \nJakub Narebski\nWarsaw, Poland\nShadeHawk on #git\n"},{"id":"28152","messageId":"eftkdk$2ii$3@sea.gmane.org","threadId":"5763","inReplyTo":"20061001215748.GG2871@admingilde.org","subject":"Re: [PATCH] gitweb: start to generate PATH_INFO URLs.","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2006-10-03T12:18:25Z","receivedAt":"2006-10-03T12:18:25Z","isPatch":true,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"Martin Waitz wrote:\n\n> +       'pathinfo' => {\n> +               'override' => 0,\n> +               'default' => [1]},\n\nYou should add failsafe to gitweb_check_feature for when 'sub' is not set;\nfor example when somebody sets $feature{'pathinfo'}{'override'} to 1.\n-- \nJakub Narebski\nWarsaw, Poland\nShadeHawk on #git\n"},{"id":"28162","messageId":"efu3u4$tc9$1@sea.gmane.org","threadId":"5763","inReplyTo":"7v8xk2jofc.fsf@assigned-by-dhcp.cox.net","subject":"Re: [PATCH] gitweb: start to generate PATH_INFO URLs","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2006-10-03T16:43:14Z","receivedAt":"2006-10-03T16:43:14Z","isPatch":true,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"Junio C Hamano wrote:\n\n> Martin Waitz <tali@admingilde.org> writes:\n> \n>> Instead of providing the project as a ?p= parameter it is simply appended\n>> to the base URI.\n>> All other parameters are appended to that, except for ?a=summary which\n>> is the default and can be omitted.\n> \n> Supporting PATH_INFO in the sense that we do sensible things\n> when we get called with one is one thing, but generating such a\n> URL that uses PATH_INFO is a different thing.  I suspect not\n> everybody's webserver is configured to call us with PATH_INFO,\n> so this should be conditional.\n\nOr perhaps we should use PATH_INFO if the URL of current page uses\nPATH_INFO too. The only place where we have to decide is the projects\nlist page (i.e. no arguments).\n-- \nJakub Narebski\nWarsaw, Poland\nShadeHawk on #git\n"},{"id":"28163","messageId":"20061003171229.GN2871@admingilde.org","threadId":"5763","inReplyTo":"eftk98$2ii$2@sea.gmane.org","subject":"Re: [PATCH] gitweb: start to generate PATH_INFO URLs","fromName":"Martin Waitz","fromEmail":"tali@admingilde.org","sentAt":"2006-10-03T17:12:29Z","receivedAt":"2006-10-03T17:12:29Z","isPatch":true,"sender":{"key":"tali@admingilde.org","avatar":"https://gravatar.com/avatar/3f89b03eee362187effabe257898735b475673a12265c398ea9161259ae91553?d=mp&s=160"},"body":"hoi :)\n\nOn Tue, Oct 03, 2006 at 02:16:05PM +0200, Jakub Narebski wrote:\n> Martin Waitz wrote:\n> > Instead of providing the project as a ?p= parameter it is simply appended\n> > to the base URI.\n> \n> I have just modified href() to be able to use it for actions which don't\n> need the ?p= parameter... and you didn't take into consideration the case\n> when $params{'project'} is set, but undefined.\n\nis this handled correctly in the second patch which got committed to\nnext?\n\n-- \nMartin Waitz\n"},{"id":"28164","messageId":"efu62g$7f8$1@sea.gmane.org","threadId":"5763","inReplyTo":"20061003171229.GN2871@admingilde.org","subject":"Re: [PATCH] gitweb: start to generate PATH_INFO URLs","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2006-10-03T17:19:42Z","receivedAt":"2006-10-03T17:19:42Z","isPatch":true,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"Martin Waitz wrote:\n\n> On Tue, Oct 03, 2006 at 02:16:05PM +0200, Jakub Narebski wrote:\n>> Martin Waitz wrote:\n>> > Instead of providing the project as a ?p= parameter it is simply appended\n>> > to the base URI.\n>> \n>> I have just modified href() to be able to use it for actions which don't\n>> need the ?p= parameter... and you didn't take into consideration the case\n>> when $params{'project'} is set, but undefined.\n> \n> is this handled correctly in the second patch which got committed to\n> next?\n\nI think it is (from the examining the patch, not from testing).\n\nPerhaps we should use PATH_INFO if current URL uses PATH_INFO... \n-- \nJakub Narebski\nWarsaw, Poland\nShadeHawk on #git\n"},{"id":"28165","messageId":"7vfye5pai1.fsf@assigned-by-dhcp.cox.net","threadId":"5763","inReplyTo":"20061003171229.GN2871@admingilde.org","subject":"Re: [PATCH] gitweb: start to generate PATH_INFO URLs","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2006-10-03T17:36:22Z","receivedAt":"2006-10-03T17:36:22Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Martin Waitz <tali@admingilde.org> writes:\n\n> On Tue, Oct 03, 2006 at 02:16:05PM +0200, Jakub Narebski wrote:\n>> \n>> I have just modified href() to be able to use it for actions which don't\n>> need the ?p= parameter... and you didn't take into consideration the case\n>> when $params{'project'} is set, but undefined.\n>\n> is this handled correctly in the second patch which got committed to\n> next?\n\nI did only a light testing last night and I do not remember\ntesting this particular issue I did not see an obvious\nbreakage.  Could you two please verify and send in fixes if you\nfind any more issues around this area?\n\nI think Jakub's suggestion to respond in PATH_INFO to requests\nthat does use PATH_INFO is a good one.\n"},{"id":"28167","messageId":"7vbqotpadg.fsf@assigned-by-dhcp.cox.net","threadId":"5763","inReplyTo":"eftkdk$2ii$3@sea.gmane.org","subject":"Re: [PATCH] gitweb: start to generate PATH_INFO URLs.","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2006-10-03T17:39:07Z","receivedAt":"2006-10-03T17:39:07Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jakub Narebski <jnareb@gmail.com> writes:\n\n> Martin Waitz wrote:\n>\n>> +       'pathinfo' => {\n>> +               'override' => 0,\n>> +               'default' => [1]},\n>\n> You should add failsafe to gitweb_check_feature for when 'sub' is not set;\n> for example when somebody sets $feature{'pathinfo'}{'override'} to 1.\n\nYes, I noticed this last night while playing with it.  We would\nat least need a big warning that says this should not be made\noverridable (which does not make any sense anyway).\n\nSetting 'sub' to a failsafe one that only returns what is in the\ndefault without looking at individual repository would be the\ncleanest, I think.\n"},{"id":"28169","messageId":"efu7r9$fra$1@sea.gmane.org","threadId":"5763","inReplyTo":"7vbqotpadg.fsf@assigned-by-dhcp.cox.net","subject":"Re: [PATCH] gitweb: start to generate PATH_INFO URLs.","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2006-10-03T17:50:00Z","receivedAt":"2006-10-03T17:50:00Z","isPatch":true,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"Junio C Hamano wrote:\n\n> Jakub Narebski <jnareb@gmail.com> writes:\n> \n>> Martin Waitz wrote:\n>>\n>>> +       'pathinfo' => {\n>>> +               'override' => 0,\n>>> +               'default' => [1]},\n>>\n>> You should add failsafe to gitweb_check_feature for when 'sub' is not\nset;\n>> for example when somebody sets $feature{'pathinfo'}{'override'} to 1.\n> \n> Yes, I noticed this last night while playing with it.  We would\n> at least need a big warning that says this should not be made\n> overridable (which does not make any sense anyway).\n> \n> Setting 'sub' to a failsafe one that only returns what is in the\n> default without looking at individual repository would be the\n> cleanest, I think.\n\nPerhaps we should not add 'override' key, and test for existence\nof 'override' to fallback on 'sub'.\n-- \nJakub Narebski\nWarsaw, Poland\nShadeHawk on #git\n"},{"id":"28170","messageId":"20061003180743.GO2871@admingilde.org","threadId":"5763","inReplyTo":"7vbqotpadg.fsf@assigned-by-dhcp.cox.net","subject":"[PATCH] gitweb: warn if feature cannot be overridden.","fromName":"Martin Waitz","fromEmail":"tali@admingilde.org","sentAt":"2006-10-03T18:07:43Z","receivedAt":"2006-10-03T18:07:43Z","isPatch":true,"sender":{"key":"tali@admingilde.org","avatar":"https://gravatar.com/avatar/3f89b03eee362187effabe257898735b475673a12265c398ea9161259ae91553?d=mp&s=160"},"body":"If the administrator configures pathinfo to be overrideable by the\nlocal repository a warning is shown.\n\nSigned-off-by: Martin Waitz <tali@admingilde.org>\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 10e803a..0ff6f7c 100755\n--- a/gitweb/gitweb.perl\n+++ b/gitweb/gitweb.perl\n@@ -116,6 +116,10 @@ sub gitweb_check_feature {\n \t\t$feature{$name}{'override'},\n \t\t@{$feature{$name}{'default'}});\n \tif (!$override) { return @defaults; }\n+\tif (!defined $sub) {\n+\t\twarn \"feature $name is not overrideable\";\n+\t\treturn @defaults;\n+\t}\n \treturn $sub->(@defaults);\n }\n \n-- \n1.4.2.3\n\n-- \nMartin Waitz\n"},{"id":"28171","messageId":"20061003180832.GP2871@admingilde.org","threadId":"5763","inReplyTo":"efu3u4$tc9$1@sea.gmane.org","subject":"[PATCH] gitweb: make PATHINFO URL generation conditional on input URL.","fromName":"Martin Waitz","fromEmail":"tali@admingilde.org","sentAt":"2006-10-03T18:08:32Z","receivedAt":"2006-10-03T18:08:32Z","isPatch":true,"sender":{"key":"tali@admingilde.org","avatar":"https://gravatar.com/avatar/3f89b03eee362187effabe257898735b475673a12265c398ea9161259ae91553?d=mp&s=160"},"body":"Now the feature 'pathinfo' configuration only applies to the project\nlist.  All other URLs are generated in the form the webpage was\ncalled itself.\n\nSigned-off-by: Martin Waitz <tali@admingilde.org>\n---\n gitweb/gitweb.perl |   11 +++++++++--\n 1 files changed, 9 insertions(+), 2 deletions(-)\n\ndiff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl\nindex 0ff6f7c..70246de 100755\n--- a/gitweb/gitweb.perl\n+++ b/gitweb/gitweb.perl\n@@ -206,6 +206,8 @@ our $git_version = qx($GIT --version) =~\n \n $projects_list ||= $projectroot;\n \n+our $use_pathinfo_url = gitweb_check_feature('pathinfo');\n+\n # ======================================================================\n # input validation and dispatch\n our $action = $cgi->param('a');\n@@ -226,6 +228,8 @@ if (defined $project) {\n \t\tundef $project;\n \t\tdie_error(undef, \"No such project\");\n \t}\n+\t# we got called without PATH_INFO, let's keep it that way.\n+\t$use_pathinfo_url = 0;\n }\n \n our $file_name = $cgi->param('f');\n@@ -308,6 +312,10 @@ sub evaluate_path_info {\n \t\tundef $project;\n \t\treturn;\n \t}\n+\t\n+\t# we were called using a PATH_INFO URL, let's keep it that way.\n+\t$use_pathinfo_url = 1;\n+\n \t# do not change any parameters if an action is given using the query string\n \treturn if $action;\n \t$path_info =~ s,^$project/*,,;\n@@ -402,8 +410,7 @@ sub href(%) {\n \n \t$params{'project'} = $project unless exists $params{'project'};\n \n-\tmy ($use_pathinfo) = gitweb_check_feature('pathinfo');\n-\tif ($use_pathinfo) {\n+\tif ($use_pathinfo_url) {\n \t\t# use PATH_INFO for project name\n \t\t$href .= \"/$params{'project'}\" if defined $params{'project'};\n \t\tdelete $params{'project'};\n-- \n1.4.2.3\n\n-- \nMartin Waitz\n"},{"id":"28181","messageId":"7vwt7hm9yq.fsf@assigned-by-dhcp.cox.net","threadId":"5763","inReplyTo":"efu7r9$fra$1@sea.gmane.org","subject":"Re: [PATCH] gitweb: start to generate PATH_INFO URLs.","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2006-10-03T20:16:13Z","receivedAt":"2006-10-03T20:16:13Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jakub Narebski <jnareb@gmail.com> writes:\n\n> Junio C Hamano wrote:\n>\n>> Jakub Narebski <jnareb@gmail.com> writes:\n>> \n>>> Martin Waitz wrote:\n>>>\n>>>> +       'pathinfo' => {\n>>>> +               'override' => 0,\n>>>> +               'default' => [1]},\n>>>\n>>> You should add failsafe to gitweb_check_feature for when 'sub' is not\n> set;\n>>> for example when somebody sets $feature{'pathinfo'}{'override'} to 1.\n>> \n>> Yes, I noticed this last night while playing with it.  We would\n>> at least need a big warning that says this should not be made\n>> overridable (which does not make any sense anyway).\n>> \n>> Setting 'sub' to a failsafe one that only returns what is in the\n>> default without looking at individual repository would be the\n>> cleanest, I think.\n>\n> Perhaps we should not add 'override' key, and test for existence\n> of 'override' to fallback on 'sub'.\n\nExcellent idea.  Please make it so.\n"},{"id":"28185","messageId":"20061003202831.GS2871@admingilde.org","threadId":"5763","inReplyTo":"efu7r9$fra$1@sea.gmane.org","subject":"Re: [PATCH] gitweb: start to generate PATH_INFO URLs.","fromName":"Martin Waitz","fromEmail":"tali@admingilde.org","sentAt":"2006-10-03T20:28:31Z","receivedAt":"2006-10-03T20:28:31Z","isPatch":true,"sender":{"key":"tali@admingilde.org","avatar":"https://gravatar.com/avatar/3f89b03eee362187effabe257898735b475673a12265c398ea9161259ae91553?d=mp&s=160"},"body":"hoi :-)\n\nOn Tue, Oct 03, 2006 at 07:50:00PM +0200, Jakub Narebski wrote:\n> Perhaps we should not add 'override' key, and test for existence\n> of 'override' to fallback on 'sub'.\n\nthis is a no-op: if the config file sets override to 1 then\nwe still break.\n\nOf course one say: don't do it then.\nBut then we don't need the check at all.\n\n-- \nMartin Waitz\n"},{"id":"28291","messageId":"20061006152925.GP20017@pasky.or.cz","threadId":"5763","inReplyTo":"7v8xk2jofc.fsf@assigned-by-dhcp.cox.net","subject":"Re: [PATCH] gitweb: start to generate PATH_INFO URLs","fromName":"Petr Baudis","fromEmail":"pasky@suse.cz","sentAt":"2006-10-06T15:30:30Z","receivedAt":"2006-10-06T15:30:30Z","isPatch":true,"sender":{"key":"pasky@ucw.cz","avatar":"https://avatars.githubusercontent.com/u/18439?v=4"},"body":"Dear diary, on Sat, Sep 30, 2006 at 12:30:47AM CEST, I got a letter\nwhere Junio C Hamano <junkio@cox.net> said that...\n> Martin Waitz <tali@admingilde.org> writes:\n> \n> > Instead of providing the project as a ?p= parameter it is simply appended\n> > to the base URI.\n> > All other parameters are appended to that, except for ?a=summary which\n> > is the default and can be omitted.\n> \n> Supporting PATH_INFO in the sense that we do sensible things\n> when we get called with one is one thing, but generating such a\n> URL that uses PATH_INFO is a different thing.  I suspect not\n> everybody's webserver is configured to call us with PATH_INFO,\n> so this should be conditional.\n\nHmm, which webservers support CGI but don't pass PATH_INFO?\n\n\nBTW, couple of notes for people who will want to try it: if gitweb.cgi\nserves as your indexfile, this will break; you need to override $my_uri\nin gitweb_config. Also, you need to change the default location of CSS,\nfavicon and logo to an absolute URL.\n\n-- \n\t\t\t\tPetr \"Pasky\" Baudis\nStuff: http://pasky.or.cz/\n#!/bin/perl -sp0777i<X+d*lMLa^*lN%0]dsXx++lMlN/dsM0<j]dsj\n$/=unpack('H*',$_);$_=`echo 16dio\\U$k\"SK$/SM$n\\EsN0p[lN*1\nlK[d2%Sa2/d0$^Ixp\"|dc`;s/\\W//g;$_=pack('H*',/((..)*)$/)\n"},{"id":"28343","messageId":"7vbqoowmb4.fsf@assigned-by-dhcp.cox.net","threadId":"5763","inReplyTo":"20061006152925.GP20017@pasky.or.cz","subject":"Re: [PATCH] gitweb: start to generate PATH_INFO URLs","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2006-10-07T08:40:47Z","receivedAt":"2006-10-07T08:40:47Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Petr Baudis <pasky@suse.cz> writes:\n\n> BTW, couple of notes for people who will want to try it: if gitweb.cgi\n> serves as your indexfile, this will break; you need to override $my_uri\n> in gitweb_config. Also, you need to change the default location of CSS,\n> favicon and logo to an absolute URL.\n\nA patch to gitweb/README is in order perhaps?\n"}]}