[Sorry if this is an FAQ, but I haven't seen it mentioned in either the
proxy status doc or the Apache 2.0 status doc.]

I'm writing a module that utilizes both input and output filters and
needs to work in conjunction with mod_proxy.  More specifically, my
module runs in the context of a 2.0 server that is being used only as a
proxy (using both ProxyPass and ProxyRequests).  Until recently, both
filters have been read-only, but now I'm starting to modify the request,
initially just to add a header in the input filter.

When I tested this, I found that the header I was adding was not making
it through to the destination.  Stepping through, I see that
ap_proxy_http_request() (in proxy_http.c) is getting called *before* my
input filter.  Since ap_proxy_http_request() performs the actual request
sending, my call to apr_table_set(r->headers_in, ...) from within my
input filter is effectively ignored.  Based on this, I'm assuming that
I'll have the same problem when I start modifying the request body.

I'm currently working around this problem by hacking into proxy_http.c
to call back into my code to do the r->headers_in manipulation before
the proxy sends the request out, but obviously I don't want to do it
that way.

So, two questions.  1: Is this a known issues?  2: If so, what's the
plan, if any, to fix it?

Thanks in advance.

- Dave

--
Dave Seidel, Founder
Mindreef, LLC
 



Reply via email to