httpd-modules-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "William A. Rowe, Jr." <>
Subject Re: handling client abort instantly?
Date Wed, 04 Mar 2009 04:13:24 GMT
Saju Pillai wrote:
> I can think of a *hack* to determine if the client has really gone away.
> In your module you can possibly do
> client = ap_filter_t->ctx->client_socket /* ap_filter_t is either the 
> input or output filter stack */
> to get the apr client socket. You can try do a 0-byte read() on this 
> socket to see if you get an error. An error means the remote side has 
> gone away. I have not tested this, I don't know if this will work for you.

You have to walk your filter back to the topmost (network) filter before
you'll find that ctx corresponds to the core's value (sock).  ctx is set
up per-filter.

View raw message