On Mon, Jun 11, 2012 at 12:29 PM, André Warnier <a...@ice-sa.com> wrote: > Just my two cent, maybe just to dampen your expectations a little bit. > This topic is probably as old as the WWW itself, and there just is no magic > bullet here. ... > But if your ultimate aim is to find a way where instant detection is > guaranteed, then give it up. It is just not possible, given how the > Internet, and TCP/IP and HTTP work.
I was certain that normal cgis under Apache2 reacted immediately to aborts. I was wrong ( As I discovered in my quest to devise a test case proving you wrong... ;-) ) Ok, we're doing the best we can then. Fine. At least the next guy that comes along will have this thread to read. So pseudocode for the magic incantation then seems to be: while (! $done) { heavyCalculationBite(); $r->print($msg); # Eval needed to support < 2.0.6 that dies if $r->connection->aborted eval { $r->rflush(); }; if ($r->connection->aborted) { # Handle user abort last; } } Thank you so much for your enlightening replies! Peter -- Peter Valdemar Mørch http://www.morch.com