1. Stefan Saasen
  2. git

Commits

Junio C Hamano  committed 811476d Merge

Merge branch 'jn/web' into next

* jn/web:
gitweb: Make use of $PATH_INFO for project parameter

  • Participants
  • Parent commits 160a59f, 49f582a
  • Branches master

Comments (0)

Files changed (1)

File gitweb/gitweb.cgi

View file
  • Ignore whitespace
 	}
 }
 
-my $project = $cgi->param('p');
+my $project = ($cgi->param('p') || $ENV{'PATH_INFO'});
 if (defined $project) {
+	$project =~ s|^/||; $project =~ s|/$||;
 	$project = validate_input($project);
 	if (!defined($project)) {
 		die_error(undef, "Invalid project parameter.");