You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by wac <wa...@edge-china.com> on 2001/06/27 14:49:06 UTC
Help me , about $r->bytes_sent
Dear All,
I want to write a handler, function : log client request file size.
My code can't work:
Apache Config file
<Location /test/>
SetHandler perl-script
PerlLogHandler My::Test
Options ExecCGI
</Location>
My::Test
package My::Test;
sub handler {
my $r = shift;
$r->send_http_header;
open (FILE,">>log.txt");
print FILE $r->filename ."\t". $r->bytes_sent . "\n";
close FILE;
}
this handler can log file name for request , but $r->bytes_sent is 0 at
all time.
Your friend,
wac