You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modules-dev@httpd.apache.org by Jodi Bosa <jo...@gmail.com> on 2010/09/14 05:08:58 UTC

Peek at request from within Connection input filter

Is there a way that I can "peek" at the request from within a Connection
filter?  In other words, I need to examine the actual HTTP request in order
to affect something in another Connection filter.  A constraint is that I
cannot modify this other Connection filter.

It seems I am in a somewhat unique situation that translating between
different protocols has introduced this issue (perhaps a close analogy is
stuffing a square peg in round hole) - and unfortunately it comes down to
either somehow "peeking" at the request, or manipulating Apache in some
other fashion, ...or writing a content handler that sets up its own filter
chain and then manually invoke those (which poses its own challenges).

Thanks.

Re: Peek at request from within Connection input filter

Posted by Nick Kew <ni...@apache.org>.
On 14 Sep 2010, at 04:08, Jodi Bosa wrote:

> Is there a way that I can "peek" at the request from within a Connection
> filter?  In other words, I need to examine the actual HTTP request in order
> to affect something in another Connection filter.  A constraint is that I
> cannot modify this other Connection filter.

No.  There isn't a request object in a connection filter.  A connection
may be handling multiple requests which can't be deterministically
mapped.  Or there may be no Request at all if the protocol is not HTTP.

If you can ensure there is a meaningful Connection-Request
correspondence in your app, use the connection's configuration
record to pass information to/from the request(s).

-- 
Nick Kew