When entering a path starting with a valid module name, but ending in an

non-existing  file or directory, a redirect to exactly the same locations
was issued, instead of an error messages.
Reported by Jan Schreiber <akira@loopback.org>
This commit is contained in:
Stefan Bethke 1997-04-30 07:35:11 +00:00
parent 3778964b63
commit 98fe3939f7
Notes: svn2git 2020-12-08 03:00:23 +00:00
svn path=/www/; revision=1459
2 changed files with 4 additions and 4 deletions

View file

@ -475,12 +475,12 @@ if (-d $fullname) {
# Is there an indexed version of modules? # Is there an indexed version of modules?
if (open(MODULES, "$cvsroot/CVSROOT/modules")) { if (open(MODULES, "$cvsroot/CVSROOT/modules")) {
while (<MODULES>) { while (<MODULES>) {
if (/^${where}\s+(\S+)/o && -d "${cvsroot}/$1") { if (/^${where}\s+(\S+)/o && -d "${cvsroot}/$1" && ($1 ne $where)) {
&redirect($scriptname . '/' . $1 . $xtra); &redirect($scriptname . '/' . $1 . $xtra);
} }
} }
} }
&fatal("404 Not Found","$where: no such file or directory"); &fatal("404 Not Found","$where$xtra: no such file or directory");
} }
sub htmlify { sub htmlify {

View file

@ -475,12 +475,12 @@ if (-d $fullname) {
# Is there an indexed version of modules? # Is there an indexed version of modules?
if (open(MODULES, "$cvsroot/CVSROOT/modules")) { if (open(MODULES, "$cvsroot/CVSROOT/modules")) {
while (<MODULES>) { while (<MODULES>) {
if (/^${where}\s+(\S+)/o && -d "${cvsroot}/$1") { if (/^${where}\s+(\S+)/o && -d "${cvsroot}/$1" && ($1 ne $where)) {
&redirect($scriptname . '/' . $1 . $xtra); &redirect($scriptname . '/' . $1 . $xtra);
} }
} }
} }
&fatal("404 Not Found","$where: no such file or directory"); &fatal("404 Not Found","$where$xtra: no such file or directory");
} }
sub htmlify { sub htmlify {