=================================================================== RCS file: /cvs/cvsweb/cvsweb.cgi,v retrieving revision 4.20 retrieving revision 4.21 diff -u -p -r4.20 -r4.21 --- cvsweb/cvsweb.cgi 2019/11/11 15:46:39 4.20 +++ cvsweb/cvsweb.cgi 2019/11/12 09:28:15 4.21 @@ -1,5 +1,5 @@ #!/usr/bin/perl -# $Id: cvsweb.cgi,v 4.20 2019/11/11 15:46:39 schwarze Exp $ +# $Id: cvsweb.cgi,v 4.21 2019/11/12 09:28:15 schwarze Exp $ # $knu: cvsweb.cgi,v 1.299 2010/11/13 16:37:18 simon # # cvsweb - a CGI interface to CVS trees. @@ -263,7 +263,7 @@ $scriptname = '' unless defined($scriptname); $where = $pathinfo; $doCheckout = $where =~ s|^/$CheckoutMagic/|/|o; $where =~ s|^/||; -$scriptname =~ s|^/*|/|; +$scriptname =~ s|^/+||; # Let's workaround thttpd's stupidity.. if ($scriptname =~ m|/$|) { @@ -271,6 +271,7 @@ if ($scriptname =~ m|/$|) { my $re = quotemeta $pathinfo; $scriptname =~ s/$re$//; } +$scriptname = "/$scriptname" if $scriptname; # $scriptname : the URI escaped path to this script # $where : the path in the CVS repository (without leading /, or only /)