git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] gitweb: Handle actions with no project in evaluate_path_info

From
Giuseppe Bilotta <giuseppe.bilotta@gmail.com>
Date
Jan 2, 2009, 00:46 UTC
Message-ID
<cb7bb73a0901011646n6a1368caq797a5f2849daec77@mail.gmail.com>
In-Reply-To
<200901020058.30748.jnareb@gmail.com>
On Fri, Jan 2, 2009 at 12:58 AM, Jakub Narebski <jnareb@gmail.com> wrote:
Show 7 quoted lines
> Truth to be told we parse action parameter in path_info only since
> d8c2882 (gitweb: parse project/action/hash_base:filename PATH_INFO)
> by Giuseppe Bilotta (CC-ed; I think he is correct person to give
> Ack for this patch). Earlier only "default" actions could be expressed
> using only path_info, and project-less 'opml' and 'project_index'
> actions are not default actions for projectless URL, so there was no
> such problem then.

Actually, the early bailout was sort of intentional. The problem is the ambiguity: does git.example.com/opml refer to the opml project, or does it refer to the opml action?

HOWEVER, href() *does* create the opml action as git.example.com/opml, so gitweb is currently broken in the sense that ti doesn't correctly parse its own pathinfo output. So the question is: shall we go with this patch, preventing pathinfo from working for projects named like a no-project gitweb action, or should we fix href() to not generate pathinfo unless project is defined?

>> -     return unless $project;
>> -     $input_params{'project'} = $project;
>> +     $input_params{'project'} = $project if $project;

Note that if this patch is accepted, we probably need an appropriate patch in href() anyway to use query params for projects named like no-project actions.

-- 
Giuseppe "Oblomov" Bilotta
Previous: Jakub NarebskiNext: Devin Doucette
Message 3 of 5 in “gitweb: Handle actions with no project in evaluate_path_info”
  1. gitweb: Handle actions with no project in evaluate_path_infoDevin Doucette, Dec 28, 2008
  2. Jakub NarebskiJan 1, 2009
  3. Giuseppe BilottaJan 2, 2009
  4. Devin DoucetteJan 2, 2009
  5. Giuseppe BilottaJan 2, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.