=================================================================== RCS file: /cvs/cvsweb/cvsweb.cgi,v retrieving revision 3.38 retrieving revision 3.40 diff -u -p -r3.38 -r3.40 --- cvsweb/cvsweb.cgi 2000/11/02 17:34:35 3.38 +++ cvsweb/cvsweb.cgi 2000/11/22 19:26:11 3.40 @@ -43,7 +43,7 @@ # SUCH DAMAGE. # # $zId: cvsweb.cgi,v 1.104 2000/11/01 22:05:12 hnordstrom Exp $ -# $Id: cvsweb.cgi,v 3.38 2000/11/02 17:34:35 knu Exp $ +# $Id: cvsweb.cgi,v 3.40 2000/11/22 19:26:11 knu Exp $ # ### @@ -63,10 +63,10 @@ use vars qw ( $is_links $is_lynx $is_w3m $is_msie $is_mozilla3 $is_textbased %input $query $barequery $sortby $bydate $byrev $byauthor $bylog $byfile $defaultDiffType $logsort $cvstree $cvsroot - $mimetype $defaultTextPlain $defaultViewable $allow_compress - $GZIPBIN $backicon $diricon $fileicon $fullname $newname - $cvstreedefault $body_tag $body_tag_for_src - $logo $defaulttitle $address + $mimetype $charset $defaultTextPlain $defaultViewable + $allow_compress $GZIPBIN $backicon $diricon $fileicon + $fullname $newname $cvstreedefault + $body_tag $body_tag_for_src $logo $defaulttitle $address $long_intro $short_instruction $shortLogLen $show_author $dirtable $tablepadding $columnHeaderColorDefault $columnHeaderColorSorted $hr_breakable $showfunc $hr_ignwhite @@ -1001,12 +1001,13 @@ sub findLastModifiedSubdirs(@) { sub htmlify_sub(&$) { (my $proc, local $_) = @_; local @_ = split(m`(]+>[^<]*)`i); - my ($linked, $result); + my $linked; + my $result = ''; while (($_, $linked) = splice(@_, 0, 2)) { &$proc(); - $result .= $_; - $result .= $linked; + $result .= $_ if defined($_); + $result .= $linked if defined($linked); } $result; @@ -2639,7 +2640,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 "$body_tag_for_src\n"; print ""; @@ -2998,7 +2999,7 @@ sub http_header(;$) { } select(GZIP); $gzip_open = 1; -# print "" if ($content_type eq "text/html"); +# print "" if ($content_type =~ m|^text/html\b|); } else { if ($is_mod_perl) { @@ -3022,12 +3023,13 @@ sub http_header(;$) { sub html_header($) { my ($title) = @_; - my $version = '$zRevision: 1.104 $ $Revision: 3.38 $'; #' - http_header(); + my $version = '$zRevision: 1.104 $ $Revision: 3.40 $'; #' + http_header($charset ne "" ? "text/html; charset=$charset" : "text/html"); print < + $title