gitweb: fix project list if PATH_INFO=="/".
The project list now uses several common header / footer generation functions. These functions only check for "defined $project", but when PATH_INFO just contains a "/" (which is often generated by web servers), then this test fails. Now explicitly undef $project if there is none so that the tests in other gitweb parts work again. Signed-off-by: Martin Waitz <tali@admingilde.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
Martin Waitz committed
Aug 17, 2006 at 00:28 UTC
13d02165042c6139905dad38ee8324780d771d99
1 file changed
+2
-1
gitweb/gitweb.perl
+2
-1
@@ -95,8 +95,9 @@ our $project = ($cgi->param('p') || $ENV{'PATH_INFO'});
95
if (defined $project) {
96
$project =~ s|^/||;
97
$project =~ s|/$||;
98
+ $project = undef unless $project;
99
}
99
-if (defined $project && $project) {
100
+if (defined $project) {
101
if (!validate_input($project)) {
102
die_error(undef, "Invalid project parameter");
103
}