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
Jakub Narebski <jnareb@gmail.com>
Date
Jan 1, 2009, 23:58 UTC
Message-ID
<200901020058.30748.jnareb@gmail.com>
In-Reply-To
<a899d7ef0812272326j1a407c30k936bf8d8975c9063@mail.gmail.com>
On Sun, 28 Dec 2008, Devin Doucette wrote:
> The action would not be set if no valid project was found in
> path_info. Removing the return if the project was not specified fixes
> the project_index and opml actions when using path_info.
>
Thanks for catching this.
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.
 
Show 22 quoted lines
> Signed-off-by: Devin Doucette <devin@doucette.cc>
> ---
>  gitweb/gitweb.perl |    3 +--
>  1 files changed, 1 insertions(+), 2 deletions(-)
> 
> diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
> index 8f574c7..b6a8ea9 100755
> --- a/gitweb/gitweb.perl
> +++ b/gitweb/gitweb.perl
> @@ -552,8 +552,7 @@ sub evaluate_path_info {
>  	while ($project && !check_head_link("$projectroot/$project")) {
>  		$project =~ s,/*[^/]*$,,;
>  	}
> -	return unless $project;
> -	$input_params{'project'} = $project;
> +	$input_params{'project'} = $project if $project;
> 
>  	# do not change any parameters if an action is given using the query string
>  	return if $input_params{'action'};
> -- 
> 1.6.1.rc4
> 
-- 
Jakub Narebski
Poland
Previous: Devin DoucetteNext: Giuseppe Bilotta
Message 2 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.