Peter Valdemar Mørch wrote on 2012-06-10: > Hi, > > I'm trying to find out how to detect user hitting 'stop' aka 'abort' in > modperl 2. I found documentation on how it works in modperl 1 ( > http://perl.apache.org/docs/1.0/guide/debug.html#Detecting_Aborted_Co > nnections - short version: $r->print returns success and > $r->connection->aborted tells whether user hit abort ). > > However, I've tested the situation to be quite different in modperl 2: > > When the user hits 'stop', the *second* $r->rflush() generates an > exception >> Apache2::RequestIO::rflush: (103) Software caused connection > as long as ~ 100ms has passed between the two rflush-es. > [...] > Using standard Debian squeeze packages: >> dpkg-query -W | grep apache2 > apache2 2.2.16-6+squeeze7 apache2-mpm-worker 2.2.16-6+squeeze7 > apache2-utils 2.2.16-6+squeeze7 apache2.2-bin 2.2.16-6+squeeze7 > apache2.2-common 2.2.16-6+squeeze7 libapache2-mod-perl2 2.0.4-7 > libapache2-reload-perl 0.10-2
I notice that you're using mod_perl-2.0.4. The behaviour of rflush() was changed in mod_perl-2.0.6 so that it no longer throws an exception on reset/aborted connections, so it would certainly be worth upgrading to 2.0.6 or 2.0.7 to see if that helps you.