=================================================================== RCS file: /cvs/cvsweb/cvsweb.cgi,v retrieving revision 3.3 retrieving revision 3.4 diff -u -p -r3.3 -r3.4 --- cvsweb/cvsweb.cgi 2000/07/27 16:16:41 3.3 +++ cvsweb/cvsweb.cgi 2000/07/28 17:24:35 3.4 @@ -41,7 +41,7 @@ # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # SUCH DAMAGE. # -# $Id: cvsweb.cgi,v 3.3 2000/07/27 16:16:41 knu Exp $ +# $Id: cvsweb.cgi,v 3.4 2000/07/28 17:24:35 knu Exp $ # ### @@ -217,8 +217,9 @@ foreach (keys %DEFAULTVALUE) $barequery = ""; foreach (@stickyvars) { # construct a query string with the sticky non default parameters set - if (defined($input{$_}) && $input{$_} ne "" && $input{$_} ne $DEFAULTVALUE{$_}) { - if ($barequery) { + if (defined($input{$_}) && $input{$_} ne '' && + !(defined($DEFAULTVALUE{$_}) && $input{$_} eq $DEFAULTVALUE{$_})) { + if ($barequery) { $barequery = $barequery . "&"; } my $thisval = urlencode($_) . "=" . urlencode($input{$_}); @@ -918,7 +919,7 @@ sub fatal { Apache->request->status((split(/ /, $errcode))[0]); } else { - print "Status: $errcode\n"; + print "Status: $errcode\r\n"; } html_header("Error"); print "Error: $errmsg\n"; @@ -933,8 +934,8 @@ sub redirect { Apache->request->header_out(Location => $url); } else { - print "Status: 301 Moved\n"; - print "Location: $url\n"; + print "Status: 301 Moved\r\n"; + print "Location: $url\r\n"; } html_header("Moved"); print "This document is located here.\n"; @@ -1475,7 +1476,7 @@ sub getDirLogs { else { my $kidpid = open($fh, "-|"); if (! $kidpid) { - close(STDERR); # rlog may complain; ignore. + open(STDERR, '>/dev/null'); # rlog may complain; ignore. exec("rlog","-r",@files); } } @@ -2325,7 +2326,7 @@ sub navigateHeader ($$$$$) { $swhere = urlencode($filename) if ($swhere eq ""); print "<\!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">"; print "\n\n"; - print ''; + print ''; print "\n$path$filename - $title - $rev\n"; print "\n"; print ""; @@ -2631,14 +2632,14 @@ sub http_header { Apache->request->header_out(Last_modified => scalar gmtime($moddate) . " GMT"); } else { - print "Last-Modified: " . scalar gmtime($moddate) . " GMT\n"; + print "Last-Modified: " . scalar gmtime($moddate) . " GMT\r\n"; } } if ($is_mod_perl) { Apache->request->content_type($content_type); } else { - print "Content-type: $content_type\n"; + print "Content-type: $content_type\r\n"; } if ($allow_compress && $maycompress) { my $fh = do {local(*FH);}; @@ -2649,9 +2650,9 @@ sub http_header { Apache->request->send_http_header; } else { - print "Content-encoding: x-gzip\n"; - print "Vary: Accept-Encoding\n"; #RFC 2068, 14.43 - print "\n"; # Close headers + print "Content-encoding: x-gzip\r\n"; + print "Vary: Accept-Encoding\r\n"; #RFC 2068, 14.43 + print "\r\n"; # Close headers } $| = 1; $| = 0; # Flush header output select ($fh); @@ -2662,7 +2663,7 @@ sub http_header { Apache->request->send_http_header; } else { - print "\n"; # Close headers + print "\r\n"; # Close headers } print "Unable to find gzip binary in the \$PATH to compress output
"; } @@ -2672,14 +2673,14 @@ sub http_header { Apache->request->send_http_header; } else { - print "\n"; # Close headers + print "\r\n"; # Close headers } } } sub html_header($) { my ($title) = @_; - my $version = '$Revision: 3.3 $'; + my $version = '$Revision: 3.4 $'; http_header(); print <