You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Christian Parpart <tr...@gentoo.org> on 2005/12/17 18:58:10 UTC

realtime client connnection abort notifications

Hi all,

I've been messing with this problem for years now. Apache at 
least didn't support it in the public API somehow, so I 
catched the connections file descriptor using a pre connection 
hook and then created a thread that poll()'s on this to invoke 
a connection abort handler I need within my module.

Actually, this is a very bad design issue within my apache module,
and now, where I'm about to refactor the whole software for the 
next big release anyways, I thought about getting rid of this 
issue, too.

What I need is a way to install a hook within the apache 
server process that gets invoked ASAP(!) the client connection
of interest has been aborted (mostly by client side).
It doesn't have to be threaded and I do not care any certain 
data access restrictions as long as I can pass some informational 
data buffer to when registering the hook to be passed to the 
hook when being invoked.

Apache already has a big I/O dispatching loop, so, is there maybe
something I can hook me in to?

Regards,
Christian Parpart.

Re: realtime client connnection abort notifications

Posted by Jeff Trawick <tr...@gmail.com>.
On 12/17/05, Christian Parpart <tr...@gentoo.org> wrote:

> What I need is a way to install a hook within the apache
> server process that gets invoked ASAP(!) the client connection
> of interest has been aborted (mostly by client side).

if a module is busy handling the request (e.g., long-running CGI, or
forwarded to some application server and is awaiting a response),
Apache has no idea when the client aborts the connection...  there's
nothing to hook into...

if we're in core code handling I/O, network-layer filter will find out
ASAP, [should] set c->aborted, and return; presumably no other
software would delay notification of this

>Apache already has a big I/O dispatching loop, so, is there maybe
>something I can hook me in to?

not generally