Hi! On Sat, Nov 29, 2003 at 02:00:18AM -0600, John Michael wrote: > Someone pointed me to checking the connection class for an abort. I found > info on this in the modperl cookbook..That seems useful if you want to > server your own files, but would take a lot of overhead if you had to > continue to check it for a large file. It would not really do me any good > to serve the file myself if under modperl I would think anyway
I'm not really sure I understand completely what you're after, but recently I had to implement something wich sound similar: Registeres users are allowed to download a fixed quantity of mp3 files. If they abort the download, their quota shouldn't be decremented. So I did something like this: $h->r->send_fd($fh); if ($h->r->connection->aborted) { $h->debug("DOWNLOAD ABBORTED!!"); # reset download count } return OK; Obviously, I am serving the mp3-files using a mod_perl enabled Apache. -- #!/usr/bin/perl http://domm.zsi.at for(ref bless{},just'another'perl'hacker){s-:+-$"-g&&print$_.$/} -- Reporting bugs: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html