On Wed, 2003-12-10 at 20:42, Stas Bekman wrote: > > Lastly, why does the memory continue to be consumer after the client has > > terminated the connection? > > Because the server doesn't realize that the connection was aborted. You can > check that with $c->aborted. It could also be a bug in Apache 2. I'd check > whether it works without mod_perl, e.g. using INCLUDES or some other core > filter with a big file.
So it would be nice to have this in the filter (at least) documentation. So instead of: while ($f->read(my $buffer, BUFF_LEN)) { # .... $f->print($buffer); } have this: while ($f->read(my $buffer, BUFF_LEN)) { return Apache::DECLINED if ($f->r->connection->aborted); $f->print($buffer); } Unless there are some caveats that I am unaware of by doing this. This made a big deal to some of my filters as they would keep processing large files unecessary after the client aborted. []'s Raul Dias -- Reporting bugs: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html