Click here to get back home

mod_perl 1.29: send_fh(): result status?

 HomeNewsGroups | Search | About
 comp.lang.perl.modules    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
mod_perl 1.29: send_fh(): result status? Brian Gorby 08-24-2005
Get Chitika Premium
Posted by Brian Gorby on August 24, 2005, 12:55 pm
Please log in for more thread options


I'm programming a web application that limits the number of downloads
for clients on certain files:

....
unless ( $r->header_only ) {
$r->send_fd($fh);
$self->record_download($user_id, $file_id);
}
close($fh);

I'd like to be able to have some sort of confirmation that the file was
sent / received in entirety before recording the download; if the
download times out for whatever reason for the client, the download will
not be recorded.

Is this something that's possible in general? with mod_perl?

-Brian


Posted by Brian Gorby on August 24, 2005, 4:59 pm
Please log in for more thread options


Brian Gorby wrote:
> Is this something that's possible in general? with mod_perl?

Found it. Apache::Connection->aborted() is just what I needed.

-Brian


Similar ThreadsPosted
CGI.pm: displaying .html file as the result August 15, 2008, 4:07 pm
Net::FTP connection status March 15, 2006, 3:34 am
Net::telnet - need to retrieve the exit status August 22, 2005, 6:00 pm
CGI.pm and ModPerl::Registry December 21, 2007, 11:20 pm
modperl and apache handlers December 28, 2004, 5:38 am
CPAN conflict issue - CGI.pm vs ModPerl::Registry September 25, 2006, 12:42 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap