version 3.2, 2000/07/20 11:52:05 |
version 3.4, 2000/07/28 17:24:35 |
|
|
@revisions %state %difflines %log %branchpoint @revorder $prcgi |
@revisions %state %difflines %log %branchpoint @revorder $prcgi |
@prcategories $prcategories |
@prcategories $prcategories |
$checkoutMagic $doCheckout $scriptname $scriptwhere |
$checkoutMagic $doCheckout $scriptname $scriptwhere |
$where $Browser $nofilelinks $maycompress @stickyvars |
$where $pathinfo $Browser $nofilelinks $maycompress @stickyvars |
%functionlineregexp |
%funcline_regexp $is_mod_perl |
|
$is_lynx $is_msie $is_mozilla3 |
%input $query $barequery $sortby $bydate $byrev $byauthor |
%input $query $barequery $sortby $bydate $byrev $byauthor |
$bylog $byfile $hr_default $logsort $cvstree $cvsroot |
$bylog $byfile $hr_default $logsort $cvstree $cvsroot |
$mimetype $defaultTextPlain $defaultViewable $allow_compress |
$mimetype $defaultTextPlain $defaultViewable $allow_compress |
|
|
$cvstreedefault $body_tag $logo $defaulttitle $address |
$cvstreedefault $body_tag $logo $defaulttitle $address |
$backcolor $long_intro $short_instruction $shortLogLen |
$backcolor $long_intro $short_instruction $shortLogLen |
$show_author $dirtable $tablepadding $columnHeaderColorDefault |
$show_author $dirtable $tablepadding $columnHeaderColorDefault |
$columnHeaderColorSorted $hr_breakable $hr_funout $hr_ignwhite |
$columnHeaderColorSorted $hr_breakable $showfunc $hr_ignwhite |
$hr_ignkeysubst $diffcolorHeading $diffcolorEmpty $diffcolorRemove |
$hr_ignkeysubst $diffcolorHeading $diffcolorEmpty $diffcolorRemove |
$diffcolorChange $diffcolorAdd $diffcolorDarkChange $difffontface |
$diffcolorChange $diffcolorAdd $diffcolorDarkChange $difffontface |
$difffontsize $inputTextSize $mime_types $allow_annotate |
$difffontsize $inputTextSize $mime_types $allow_annotate |
|
|
##### Start of Configuration Area ######## |
##### Start of Configuration Area ######## |
# == EDIT this == |
# == EDIT this == |
# User configuration is stored in |
# User configuration is stored in |
$config = $ENV{'CVSWEB_CONFIG'} || '/usr/local/etc/cvsweb.conf'; |
$config = defined($ENV{CVSWEB_CONFIG}) ? $ENV{CVSWEB_CONFIG} : '/usr/local/etc/cvsweb.conf'; |
|
|
# == Configuration defaults == |
# == Configuration defaults == |
# Defaults for configuration variables that shouldn't need |
# Defaults for configuration variables that shouldn't need |
Line 96 $allow_version_select = 1; |
|
Line 97 $allow_version_select = 1; |
|
$cvstreedefault = $body_tag = $logo = $defaulttitle = $address = |
$cvstreedefault = $body_tag = $logo = $defaulttitle = $address = |
$backcolor = $long_intro = $short_instruction = $shortLogLen = |
$backcolor = $long_intro = $short_instruction = $shortLogLen = |
$show_author = $dirtable = $tablepadding = $columnHeaderColorDefault = |
$show_author = $dirtable = $tablepadding = $columnHeaderColorDefault = |
$columnHeaderColorSorted = $hr_breakable = $hr_funout = $hr_ignwhite = |
$columnHeaderColorSorted = $hr_breakable = $showfunc = $hr_ignwhite = |
$hr_ignkeysubst = $diffcolorHeading = $diffcolorEmpty = $diffcolorRemove = |
$hr_ignkeysubst = $diffcolorHeading = $diffcolorEmpty = $diffcolorRemove = |
$diffcolorChange = $diffcolorAdd = $diffcolorDarkChange = $difffontface = |
$diffcolorChange = $diffcolorAdd = $diffcolorDarkChange = $difffontface = |
$difffontsize = $inputTextSize = $mime_types = $allow_annotate = |
$difffontsize = $inputTextSize = $mime_types = $allow_annotate = |
|
|
|
|
$verbose = $v; |
$verbose = $v; |
$checkoutMagic = "~checkout~"; |
$checkoutMagic = "~checkout~"; |
$where = defined($ENV{'PATH_INFO'}) ? $ENV{'PATH_INFO'} : ""; |
$pathinfo = defined($ENV{PATH_INFO}) ? $ENV{PATH_INFO} : ''; |
|
$where = $pathinfo; |
$doCheckout = ($where =~ /^\/$checkoutMagic/); |
$doCheckout = ($where =~ /^\/$checkoutMagic/); |
$where =~ s|^/($checkoutMagic)?||; |
$where =~ s|^/($checkoutMagic)?||; |
$where =~ s|/+$||; |
$where =~ s|/+$||; |
($scriptname = $ENV{'SCRIPT_NAME'}) =~ s|^/?|/|; |
$scriptname = defined($ENV{SCRIPT_NAME}) ? $ENV{SCRIPT_NAME} : ''; |
|
$scriptname =~ s|^/?|/|; |
$scriptname =~ s|/+$||; |
$scriptname =~ s|/+$||; |
|
$scriptwhere = $scriptname; |
if ($where) { |
if ($where) { |
$scriptwhere = $scriptname . '/' . urlencode($where); |
$scriptwhere .= '/' . urlencode($where); |
} |
} |
else { |
|
$scriptwhere = $scriptname; |
|
} |
|
$scriptwhere =~ s|/+$||; |
|
|
|
|
$is_mod_perl = defined($ENV{MOD_PERL}); |
|
|
# in lynx, it it very annoying to have two links |
# in lynx, it it very annoying to have two links |
# per file, so disable the link at the icon |
# per file, so disable the link at the icon |
# in this case: |
# in this case: |
$Browser = $ENV{'HTTP_USER_AGENT'}; |
$Browser = $ENV{HTTP_USER_AGENT} || ''; |
$nofilelinks = ($Browser =~ m'^Lynx/'); |
$is_lynx = ($Browser =~ m`^Lynx/`); |
|
$is_msie = ($Browser =~ m`MSIE`); |
|
$is_mozilla3 = ($Browser =~ m`^Mozilla/[3456789]`); |
|
|
|
$nofilelinks = $is_lynx; |
|
|
# newer browsers accept gzip content encoding |
# newer browsers accept gzip content encoding |
# and state this in a header |
# and state this in a header |
# (netscape did always but didn't state it) |
# (netscape did always but didn't state it) |
Line 143 $nofilelinks = ($Browser =~ m'^Lynx/'); |
|
Line 149 $nofilelinks = ($Browser =~ m'^Lynx/'); |
|
# Turn off gzip if running under mod_perl. piping does |
# Turn off gzip if running under mod_perl. piping does |
# not work as expected inside the server. One can probably |
# not work as expected inside the server. One can probably |
# achieve the same result using Apache::GZIPFilter. |
# achieve the same result using Apache::GZIPFilter. |
$maycompress =(($ENV{'HTTP_ACCEPT_ENCODING'} =~ m|gzip| |
$maycompress =(($ENV{HTTP_ACCEPT_ENCODING} =~ m`gzip` |
|| $Browser =~ m%^Mozilla/3%) |
|| $is_mozilla3) |
&& ($Browser !~ m/MSIE/) |
&& !$is_msie |
&& !defined($ENV{'MOD_PERL'})); |
&& !$is_mod_perl); |
|
|
# put here the variables we need in order |
# put here the variables we need in order |
# to hold our state - they will be added (with |
# to hold our state - they will be added (with |
# their current value) to any link/query string |
# their current value) to any link/query string |
# you construct |
# you construct |
@stickyvars = ('cvsroot','hideattic','sortby','logsort','f','only_with_tag'); |
@stickyvars = qw(cvsroot hideattic sortby logsort fonly_with_tag); |
|
|
if (-f $config) { |
if (-f $config) { |
do "$config"; |
do $config; |
} |
} |
else { |
else { |
&fatal("500 Internal Error", |
&fatal("500 Internal Error", |
|
|
} |
} |
|
|
undef %input; |
undef %input; |
if ($query = $ENV{'QUERY_STRING'}) { |
$query = $ENV{QUERY_STRING}; |
|
|
|
if ($query ne '') { |
foreach (split(/&/, $query)) { |
foreach (split(/&/, $query)) { |
s/%(..)/sprintf("%c", hex($1))/ge; # unquote %-quoted |
s/%(..)/sprintf("%c", hex($1))/ge; # unquote %-quoted |
if (/(\S+)=(.*)/) { |
if (/(\S+)=(.*)/) { |
Line 209 foreach (keys %DEFAULTVALUE) |
|
Line 217 foreach (keys %DEFAULTVALUE) |
|
$barequery = ""; |
$barequery = ""; |
foreach (@stickyvars) { |
foreach (@stickyvars) { |
# construct a query string with the sticky non default parameters set |
# construct a query string with the sticky non default parameters set |
if (defined($input{$_}) && $input{$_} ne "" && $input{$_} ne $DEFAULTVALUE{$_}) { |
if (defined($input{$_}) && $input{$_} ne '' && |
if ($barequery) { |
!(defined($DEFAULTVALUE{$_}) && $input{$_} eq $DEFAULTVALUE{$_})) { |
|
if ($barequery) { |
$barequery = $barequery . "&"; |
$barequery = $barequery . "&"; |
} |
} |
my $thisval = urlencode($_) . "=" . urlencode($input{$_}); |
my $thisval = urlencode($_) . "=" . urlencode($input{$_}); |
|
|
|
|
$hr_default = $input{'f'} eq 'h'; |
$hr_default = $input{'f'} eq 'h'; |
|
|
$logsort = $input{"logsort"}; |
$logsort = $input{'logsort'}; |
|
|
|
|
## Default CVS-Tree |
## Default CVS-Tree |
Line 276 foreach my $k (keys %ICONS) { |
|
Line 285 foreach my $k (keys %ICONS) { |
|
no strict 'refs'; |
no strict 'refs'; |
my ($itxt,$ipath,$iwidth,$iheight) = @{$ICONS{$k}}; |
my ($itxt,$ipath,$iwidth,$iheight) = @{$ICONS{$k}}; |
if ($ipath) { |
if ($ipath) { |
$ {"${k}icon"} = "<IMG SRC=\"$ipath\" ALT=\"$itxt\" BORDER=\"0\" WIDTH=\"$iwidth\" HEIGHT=\"$iheight\">"; |
${"${k}icon"} = "<IMG SRC=\"$ipath\" ALT=\"$itxt\" BORDER=\"0\" WIDTH=\"$iwidth\" HEIGHT=\"$iheight\">"; |
} |
} |
else { |
else { |
$ {"${k}icon"} = $itxt; |
${"${k}icon"} = $itxt; |
} |
} |
} |
} |
|
|
Line 312 if (-d $fullname) { |
|
Line 321 if (-d $fullname) { |
|
# ensure, that directories always end with (exactly) one '/' |
# ensure, that directories always end with (exactly) one '/' |
# to allow relative URL's. If they're not, make a redirect. |
# to allow relative URL's. If they're not, make a redirect. |
## |
## |
my $pathinfo = defined($ENV{'PATH_INFO'}) ? $ENV{'PATH_INFO'} : ""; |
|
if (!($pathinfo =~ m|/$|) || ($pathinfo =~ m |/{2,}$|)) { |
if (!($pathinfo =~ m|/$|) || ($pathinfo =~ m |/{2,}$|)) { |
redirect ($scriptwhere . '/' . $query); |
redirect ($scriptwhere . '/' . $query); |
} |
} |
Line 347 elsif (-d $fullname) { |
|
Line 355 elsif (-d $fullname) { |
|
getDirLogs($cvsroot,$where,@subLevelFiles); |
getDirLogs($cvsroot,$where,@subLevelFiles); |
|
|
if ($where eq '/') { |
if ($where eq '/') { |
html_header("$defaulttitle"); |
html_header($defaulttitle); |
$long_intro =~ s/!!CVSROOTdescr!!/$CVSROOTdescr{$cvstree}/g; |
$long_intro =~ s/!!CVSROOTdescr!!/$CVSROOTdescr{$cvstree}/g; |
print $long_intro; |
print $long_intro; |
} |
} |
else { |
else { |
html_header("$where"); |
html_header($where); |
print $short_instruction; |
print $short_instruction; |
} |
} |
|
|
|
|
|
|
sub fatal { |
sub fatal { |
my($errcode, $errmsg) = @_; |
my($errcode, $errmsg) = @_; |
if (defined($ENV{'MOD_PERL'})) { |
if ($is_mod_perl) { |
Apache->request->status((split(/ /, $errcode))[0]); |
Apache->request->status((split(/ /, $errcode))[0]); |
} |
} |
else { |
else { |
print "Status: $errcode\n"; |
print "Status: $errcode\r\n"; |
} |
} |
html_header("Error"); |
html_header("Error"); |
print "Error: $errmsg\n"; |
print "Error: $errmsg\n"; |
|
|
|
|
sub redirect { |
sub redirect { |
my($url) = @_; |
my($url) = @_; |
if (defined($ENV{'MOD_PERL'})) { |
if ($is_mod_perl) { |
Apache->request->status(301); |
Apache->request->status(301); |
Apache->request->header_out(Location => $url); |
Apache->request->header_out(Location => $url); |
} |
} |
else { |
else { |
print "Status: 301 Moved\n"; |
print "Status: 301 Moved\r\n"; |
print "Location: $url\n"; |
print "Location: $url\r\n"; |
} |
} |
html_header("Moved"); |
html_header("Moved"); |
print "This document is located <A HREF=$url>here</A>.\n"; |
print "This document is located <A HREF=$url>here</A>.\n"; |
Line 1007 sub doAnnotate ($$) { |
|
Line 1015 sub doAnnotate ($$) { |
|
# reasons .. |
# reasons .. |
if (!($rev =~ /^[\d\.]+$/)) { |
if (!($rev =~ /^[\d\.]+$/)) { |
&fatal("404 Not Found", |
&fatal("404 Not Found", |
"Malformed query \"$ENV{'QUERY_STRING'}\""); |
"Malformed query \"$ENV{QUERY_STRING}\""); |
} |
} |
|
|
($pathname = $where) =~ s/(Attic\/)?[^\/]*$//; |
($pathname = $where) =~ s/(Attic\/)?[^\/]*$//; |
Line 1053 sub doAnnotate ($$) { |
|
Line 1061 sub doAnnotate ($$) { |
|
# least to the point of including the directories down to the one |
# least to the point of including the directories down to the one |
# containing the file in question). |
# containing the file in question). |
# So if $where is "dir/sdir/file", then @dirs will be ("dir","sdir","file") |
# So if $where is "dir/sdir/file", then @dirs will be ("dir","sdir","file") |
my @dirs = split (/\//, $where); |
my @dirs = split('/', $where); |
my $path = ""; |
my $path = ""; |
foreach (@dirs) { |
foreach (@dirs) { |
if ($path eq "") { |
if ($path eq "") { |
Line 1061 sub doAnnotate ($$) { |
|
Line 1069 sub doAnnotate ($$) { |
|
$path = $_; |
$path = $_; |
} |
} |
else { |
else { |
print $writer "Directory " . $path . "\n"; |
print $writer "Directory $path\n"; |
print $writer "$cvsroot/" . $path ."\n"; |
print $writer "$cvsroot/$path\n"; |
# In our example, $_ is "sdir" and $path becomes "dir/sdir" |
# In our example, $_ is "sdir" and $path becomes "dir/sdir" |
# And the next time, "file" and "dir/sdir/file" (which then gets |
# And the next time, "file" and "dir/sdir/file" (which then gets |
# ignored, because we don't need to send Directory for the file). |
# ignored, because we don't need to send Directory for the file). |
$path = $path . "/" . $_; |
$path .= "/$_"; |
} |
} |
} |
} |
# And the last "Directory" before "annotate" is the top level. |
# And the last "Directory" before "annotate" is the top level. |
Line 1123 sub doAnnotate ($$) { |
|
Line 1131 sub doAnnotate ($$) { |
|
$oldLusr = $lusr; |
$oldLusr = $lusr; |
# is there a less timeconsuming way to strip spaces ? |
# is there a less timeconsuming way to strip spaces ? |
($lrev = $lrev) =~ s/\s+//g; |
($lrev = $lrev) =~ s/\s+//g; |
my $isCurrentRev = ("$rev" eq "$lrev"); |
my $isCurrentRev = ($rev eq $lrev); |
|
|
print "<b>" if ($isCurrentRev); |
print "<b>" if ($isCurrentRev); |
printf ("%8s%s%8s %4d:", $revprint, ($isCurrentRev ? "|" : " "), $usrprint, $lineNr); |
printf ("%8s%s%8s %4d:", $revprint, ($isCurrentRev ? "|" : " "), $usrprint, $lineNr); |
Line 1160 sub doCheckout { |
|
Line 1168 sub doCheckout { |
|
# reasons .. |
# reasons .. |
if (defined($rev) && !($rev =~ /^[\d\.]+$/)) { |
if (defined($rev) && !($rev =~ /^[\d\.]+$/)) { |
&fatal("404 Not Found", |
&fatal("404 Not Found", |
"Malformed query \"$ENV{'QUERY_STRING'}\""); |
"Malformed query \"$ENV{QUERY_STRING}\""); |
} |
} |
|
|
# get mimetype |
# get mimetype |
Line 1194 sub doCheckout { |
|
Line 1202 sub doCheckout { |
|
# Safely for a child process to read from. |
# Safely for a child process to read from. |
if (! open($fh, "-|")) { # child |
if (! open($fh, "-|")) { # child |
open(STDERR, ">&STDOUT"); # Redirect stderr to stdout |
open(STDERR, ">&STDOUT"); # Redirect stderr to stdout |
exec("cvs", "-d", "$cvsroot", "co", "-p", "$revopt", "$where"); |
exec("cvs", "-d", $cvsroot, "co", "-p", $revopt, $where); |
} |
} |
#=================================================================== |
#=================================================================== |
#Checking out squid/src/ftp.c |
#Checking out squid/src/ftp.c |
|
|
# reasons .. |
# reasons .. |
if (!($rev1 =~ /^[\d\.]+$/) || !($rev2 =~ /^[\d\.]+$/)) { |
if (!($rev1 =~ /^[\d\.]+$/) || !($rev2 =~ /^[\d\.]+$/)) { |
&fatal("404 Not Found", |
&fatal("404 Not Found", |
"Malformed query \"$ENV{'QUERY_STRING'}\""); |
"Malformed query \"$ENV{QUERY_STRING}\""); |
} |
} |
# |
# |
# rev1 and rev2 are now both numeric revisions. |
# rev1 and rev2 are now both numeric revisions. |
|
|
} |
} |
|
|
# apply special options |
# apply special options |
if ($human_readable) { |
if ($showfunc) { |
if ($hr_funout) { |
push @difftype, '-p'; |
push @difftype, '-p'; |
|
|
|
my($re1, $re2); |
my($re1, $re2); |
|
|
while (($re1, $re2) = each %functionlineregexp) { |
while (($re1, $re2) = each %funcline_regexp) { |
if ($fullname =~ /$re1/) { |
if ($fullname =~ /$re1/) { |
push @difftype, '-F', '$re2'; |
push @difftype, '-F', '$re2'; |
last; |
last; |
} |
|
} |
} |
} |
} |
|
} |
|
if ($human_readable) { |
if ($hr_ignwhite) { |
if ($hr_ignwhite) { |
push @difftype, '-w'; |
push @difftype, '-w'; |
} |
} |
|
|
} |
} |
} |
} |
if (! open($fh, "-|")) { # child |
if (! open($fh, "-|")) { # child |
open(STDERR, ">&STDOUT"); # Redirect stderr to stdout |
open(STDERR, ">&STDOUT"); # Redirect stderr to stdout |
exec("rcsdiff",@difftype,"-r$rev1","-r$rev2",$fullname); |
exec("rcsdiff",@difftype,"-r$rev1","-r$rev2",$fullname); |
} |
} |
if ($human_readable) { |
if ($human_readable) { |
http_header(); |
http_header(); |
Line 1468 sub getDirLogs { |
|
Line 1476 sub getDirLogs { |
|
else { |
else { |
my $kidpid = open($fh, "-|"); |
my $kidpid = open($fh, "-|"); |
if (! $kidpid) { |
if (! $kidpid) { |
close(STDERR); # rlog may complain; ignore. |
open(STDERR, '>/dev/null'); # rlog may complain; ignore. |
exec("rlog","-r",@files); |
exec("rlog","-r",@files); |
} |
} |
} |
} |
|
|
$backurl = $scriptname . "/" . urlencode($upwhere) . $query; |
$backurl = $scriptname . "/" . urlencode($upwhere) . $query; |
print &link($backicon, "$backurl#$filename"), |
print &link($backicon, "$backurl#$filename"), |
" <b>Up to ", &clickablePath($upwhere, 1), "</b><p>\n"; |
" <b>Up to ", &clickablePath($upwhere, 1), "</b><p>\n"; |
print "<A HREF=\"#diff\">Request diff between arbitrary revisions</A>\n"; |
print <<EOF; |
print "<HR NOSHADE>\n"; |
<A HREF="#diff">Request diff between arbitrary revisions</A> |
|
<HR NOSHADE> |
|
EOF |
if ($curbranch) { |
if ($curbranch) { |
print "Default branch: "; |
print "Default branch: ", ($revsym{$curbranch} || $curbranch); |
print ($revsym{$curbranch} || $curbranch); |
|
} |
} |
else { |
else { |
print "No default branch"; |
print "No default branch"; |
Line 2373 sub readableTime ($$) |
|
Line 2382 sub readableTime ($$) |
|
} |
} |
$i--; |
$i--; |
$break = $breaks[$i]; |
$break = $breaks[$i]; |
$retval = plural_write(int ($secs / $break), $desc{"$break"}); |
$retval = plural_write(int ($secs / $break), $desc{$break}); |
|
|
if ($long == 1 && $i > 0) { |
if ($long == 1 && $i > 0) { |
my $rest = $secs % $break; |
my $rest = $secs % $break; |
$i--; |
$i--; |
$break = $breaks[$i]; |
$break = $breaks[$i]; |
my $resttime = plural_write(int ($rest / $break), |
my $resttime = plural_write(int ($rest / $break), |
$desc{"$break"}); |
$desc{$break}); |
if ($resttime) { |
if ($resttime) { |
$retval = $retval . ", " . $resttime; |
$retval = $retval . ", " . $resttime; |
} |
} |
Line 2413 sub clickablePath($$) { |
|
Line 2422 sub clickablePath($$) { |
|
$retval = $retval . " / "; |
$retval = $retval . " / "; |
$wherepath = $wherepath . '/' . $_; |
$wherepath = $wherepath . '/' . $_; |
my ($last) = "$wherepath/" eq "/$pathname" |
my ($last) = "$wherepath/" eq "/$pathname" |
|| "$wherepath" eq "/$pathname"; |
|| $wherepath eq "/$pathname"; |
if ($clickLast || !$last) { |
if ($clickLast || !$last) { |
$retval = $retval . "<a href=\"${scriptname}" |
$retval = $retval . "<a href=\"${scriptname}" |
. urlencode($wherepath) |
. urlencode($wherepath) |
Line 2454 sub chooseCVSRoot() { |
|
Line 2463 sub chooseCVSRoot() { |
|
print ">\n"; |
print ">\n"; |
foreach $k (@foo) { |
foreach $k (@foo) { |
print "<option value=\"$k\""; |
print "<option value=\"$k\""; |
print " selected" if ("$k" eq "$cvstree"); |
print " selected" if ($k eq $cvstree); |
print ">" . ($CVSROOTdescr{"$k"} ? $CVSROOTdescr{"$k"} : |
print ">" . ($CVSROOTdescr{$k} ? $CVSROOTdescr{$k} : |
$k). "</option>\n"; |
$k). "</option>\n"; |
} |
} |
print "</select>\n</td>"; |
print "</select>\n</td>"; |
Line 2618 sub urlencode { |
|
Line 2627 sub urlencode { |
|
|
|
sub http_header { |
sub http_header { |
my $content_type = shift || "text/html"; |
my $content_type = shift || "text/html"; |
my $is_mod_perl = defined($ENV{'MOD_PERL'}); |
|
if (defined($moddate)) { |
if (defined($moddate)) { |
if ($is_mod_perl) { |
if ($is_mod_perl) { |
Apache->request->header_out(Last_modified => scalar gmtime($moddate) . " GMT"); |
Apache->request->header_out(Last_modified => scalar gmtime($moddate) . " GMT"); |
} |
} |
else { |
else { |
print "Last-Modified: " . scalar gmtime($moddate) . " GMT\n"; |
print "Last-Modified: " . scalar gmtime($moddate) . " GMT\r\n"; |
} |
} |
} |
} |
if ($is_mod_perl) { |
if ($is_mod_perl) { |
Apache->request->content_type($content_type); |
Apache->request->content_type($content_type); |
} |
} |
else { |
else { |
print "Content-type: $content_type\n"; |
print "Content-type: $content_type\r\n"; |
} |
} |
if ($allow_compress && $maycompress) { |
if ($allow_compress && $maycompress) { |
my $fh = do {local(*FH);}; |
my $fh = do {local(*FH);}; |
Line 2642 sub http_header { |
|
Line 2650 sub http_header { |
|
Apache->request->send_http_header; |
Apache->request->send_http_header; |
} |
} |
else { |
else { |
print "Content-encoding: x-gzip\n"; |
print "Content-encoding: x-gzip\r\n"; |
print "Vary: Accept-Encoding\n"; #RFC 2068, 14.43 |
print "Vary: Accept-Encoding\r\n"; #RFC 2068, 14.43 |
print "\n"; # Close headers |
print "\r\n"; # Close headers |
} |
} |
$| = 1; $| = 0; # Flush header output |
$| = 1; $| = 0; # Flush header output |
select ($fh); |
select ($fh); |
Line 2655 sub http_header { |
|
Line 2663 sub http_header { |
|
Apache->request->send_http_header; |
Apache->request->send_http_header; |
} |
} |
else { |
else { |
print "\n"; # Close headers |
print "\r\n"; # Close headers |
} |
} |
print "<font size=-1>Unable to find gzip binary in the \$PATH to compress output</font><br>"; |
print "<font size=-1>Unable to find gzip binary in the \$PATH to compress output</font><br>"; |
} |
} |
Line 2665 sub http_header { |
|
Line 2673 sub http_header { |
|
Apache->request->send_http_header; |
Apache->request->send_http_header; |
} |
} |
else { |
else { |
print "\n"; # Close headers |
print "\r\n"; # Close headers |
} |
} |
} |
} |
} |
} |
Line 2679 sub html_header($) { |
|
Line 2687 sub html_header($) { |
|
"http://www.w3.org/TR/REC-html40/loose.dtd"> |
"http://www.w3.org/TR/REC-html40/loose.dtd"> |
<html> |
<html> |
<title>$title</title> |
<title>$title</title> |
<!-- hennerik CVSweb $version --> |
<!-- CVSweb $version --> |
</head> |
</head> |
$body_tag |
$body_tag |
$logo <h1 align="center">$title</h1> |
$logo <h1 align="center">$title</h1> |