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/26 07:56:58 UTC

Help me!

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.

Please tell me why and how to get this size.
Thanks for your help!

Your firend,
wac