perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Valdemar Mørch <>
Subject Re: User abort/stop, modperl 2 and TCP FIN / RST?
Date Mon, 11 Jun 2012 23:13:54 GMT
On Mon, Jun 11, 2012 at 12:29 PM, André Warnier <> 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) {
        # Eval needed to support < 2.0.6 that dies if $r->connection->aborted
        eval {
        if ($r->connection->aborted) {
            # Handle user abort

Thank you so much for your enlightening replies!

Peter Valdemar Mørch

View raw message