I want to get the byte amounts that sent to the client via Apache, so I write the 
following code

#!/usr/bin/perl
use strict;
package Apache::GetByte;
use Apache::Constants qw(:response);
use Apache ();
sub handler{
    my $r = shift;
    my $byte=$r->bytes_sent;
    warn "BYTE = $byte \n";
    return DECLINED;
 }
1;

In apache httpd.conf 
<Directory "public_html">
  SetHandler perl-script
  PerlLogHandler Apache::GetByte
</Directory>


but the result is BYTE = 0 in apache error_log. Why? What shall I do? 


Yours sincerely

Li junfeng
        Livin' on the Edge(Dalian)CO.Ltd
        Room 106, A Bldg. 1 Huoju Road
        Hi-Tech Zone, Dalian, China Zip:116023
        Tel:86-0411-4753511 Fax:86-0411-4753577
        E-mail [EMAIL PROTECTED]

Reply via email to