On Tue, 26 Jun 2001, wac wrote:
> Dear all members:
>
> I have a question , I want to use mod_perl handler print file sent size.
>
> Apache Config file httpd.conf
> =========================================================
> Alias /test/ "D:/test/"
> <Location /test/>
> SetHandler perl-script
> PerlHandler My::Test
> Options ExecCGI
> </Location> =========================================================
>
>
> Perl Module My::Test
> =========================================================
> package My::Test;
>
> sub hanlder {
> my $r = shift;
> open(FILE,$r->filename) || return 404;
> $r->send_fd(FILE);
> close(FILE);
> print $r->bytes_sent;
> }
> 1;
> =========================================================
>
> this code print content of request file, but $r->bytes_sent print 0 at
> all times.
RTFM http://www.modperl.com/book/chapters/ch9.html#Server_Response_Methods
> Please tell me why and how to get this size.
> Thanks for your help!
>
> Your firend,
> wac
>
_____________________________________________________________________
Stas Bekman JAm_pH -- Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide http://perl.apache.org/guide
mailto:[EMAIL PROTECTED] http://apachetoday.com http://eXtropia.com/
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/