Mike Cardwell wrote:
Hi people,
I'm using:
Apache/1.3.33
mod_perl/1.29
On a Debian Sarge system.
The code I'm having problems with is quite long, so I've written a cut
down version. In my virtual host block I have something along the lines of:
<Location /test.tar>
SetHandler perl-script
PerlHandler My::Handler
</Location>
Basically, you go to /test.tar and a tarball is returned by My::Handler.
However, it is generated on the fly like:
# Get the content-length:
my( $command ) = "/bin/tar -c -h -f /dev/null --totals the_directory
2>&1"=~/^(.+)$/;
`$command` =~ /Total bytes written: (\d+)/gsm;
You probably better off not using an external process, but
http://search.cpan.org/dist/Archive-Tar/ instead.
The problem is, when someone hits stop in their web browser and ends the
transfer prematurely, the tar command doesn't die like I'd hoped it
would. I'm assuming here that I'm missing something basic in my
knowledge of how modperl works...
This is normal, please read:
http://perl.apache.org/docs/1.0/guide/debug.html#Handling_the__User_pressed_Stop_button__case
--
__________________________________________________________________
Stas Bekman JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org http://ticketmaster.com
--
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html