On Mon, 15 Mar 2010, Joe Orton wrote:

On Fri, Mar 12, 2010 at 08:47:48PM +0100, Stefan Fritsch wrote:
I have also tried inserting the filter in pre_connection and storing
the socket as filter context, and then removing the filter in the
first invocation of reqtimeout_filter. But this did not work well
either, because ap_remove_input_filter can't remove a connection
filter from the current request (is this a bug?).

Sounds like this issue:

http://marc.info/?l=apache-httpd-dev&m=105366252619530&w=2

Yes, that's it. So it's just the first connection filter that cannot be removed.

though thinking about it now, I wonder if this has been made more severe
by this change:

http://svn.apache.org/viewvc?rev=600473&view=rev

since all conn-level filters now have no knowledge of a request_rec even
if they were created with such knowledge.

For mod_reqtimeout it doesn't make a difference as the request_rec was never available. The only fixes I can think of are creating a dummy filter between the connection filters and the per-request filters (as outlined in the mail linked to above), or adding some API that allows ap_remove_input_filter() to get the request_rec from the conn_rec. I am not sure if the latter may create races in async threaded MPMs, though.

In any case, I think I have worked around the problem for mod_reqtimeout.

Reply via email to