how to trap connection reset/abort in Apache::Filter?

[prev] [thread] [next] [Date index for 2005/05/01]

From: Jeff Ambrosino
Subject: how to trap connection reset/abort in Apache::Filter?
Date: 20:29 on 01 May 2005
I've got an HTTP output filter running on mp2-RC4 + httpd2.0.54 +
libapreq2-2.04_03-dev, and occasionally I see these messages in my
error_log:

[Sun May 01 05:12:21 2005] [error] [client X.X.X.X]
Apache::Filter::print: (104)Connection reset by peer at
/var/httpd/lib/perl/MyOutputFilter.pm line
453n\tMyOutputFilter::handler('Apache::Filter=3DSCALAR(0x87106a8)',
'APR::Brigade=3DSCALAR(0x86eac6c)') called at -e line 0\n\teval {...}
called at -e line 0\nApache::Filter: (103) Software caused connection
abort at -e line 0

Line 453, as referenced in this error, is:

$f->print ($f->ctx) if ( defined($f->ctx) );

I assume the errors are due to the end user clicking "stop" or
navigating away from the page before it has finished being sent...=20
but is there a [more elegant] way of trapping these events from within
my mod_perl filter?

thanks
Jeff

(message missing)

how to trap connection reset/abort in Apache::Filter?
Jeff Ambrosino 20:29 on 01 May 2005

Generated at 15:53 on 25 May 2005 by mariachi v0.52