On Mar 19, 2013, at 1:15 PM, Graham Leggett <[email protected]> wrote:
> On 19 Mar 2013, at 7:09 PM, Jim Jagielski <[email protected]> wrote: > >> I've added bypassing and removing... for flexibility. > > Is there a generic way for modules to figure out for themselves whether they > should be caring about a particular request or connection? > > In other words, if reqtimeout had a way to say "is this an HTTP request?" and > if the answer is no, step away? > > In the case where the protocol is upgraded, or is in some way made to be no > longer HTTP, a module like reqtimeout can step out of the way automagically, > and modules don't need explicit knowledge about one another. Agreed... The conn_rec includes a bunch of HTTP related fields which could serve as such, but the main issue, I think, is that websockets starts off as HTTP and then changes, so the initial conn_rec info is HTTP, it's just that after the Upgrade, it isn't. So at that point, it's hard to change. The other way to handle this, I *think*, and keep mod_reqtimeout.c virgin, is, in the websocket module, use ap_get_input_filter_handle() to get "reqtimeout" and then remove it directly in the websocket module. It's not automagical, but it prevents monkeying w/ mod_reqtimeout.
