[Catalyst] Detecting if a user aborted a (long) download
Jeff Chimene
jchimene at gmail.com
Mon Mar 12 00:59:25 GMT 2007
Thomas Klausner wrote:
> Hi!
>
> On Sun, Mar 11, 2007 at 03:26:13PM +0100, Thomas Klausner wrote:
>
>
>> Now, using Catalyst (on mod_perl 2.x), I'm doing this to send the file:
>>
>> $c->res->body( $fh );
>>
>
> This was maybe a bit to short:
>
> my $fh = IO::File->new( $full_path, 'r' );
> if ( defined $fh ) {
> binmode $fh;
> $c->res->body( $fh );
> }
> }
>
>
>
How about sendfile()
http://perl.apache.org/docs/2.0/api/Apache2/RequestIO.html#C_sendfile_
More information about the Catalyst
mailing list