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


Reply via email to