httpd-modules-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bartov, Asaf" <>
Subject Header injection after reading the post body
Date Wed, 31 Jan 2007 11:55:29 GMT

I'm trying to write an Apache 2.x input filter that would inject an HTTP
header, based on conditions determinable only after reading the POST
body (if any).  Just injecting a header can be done with a hook -- a
filter would not even be needed; but what I need is to modify the
headers only after reading post body, so I do need to be an input

The problem is that, as far as I can tell, when my filter has got hold
of the bucket brigade with the request body, it is simply too late to
modify the headers -- I can make assignments to the r->headers_in table,
but they won't have any effect, because by the time my filter has got
the request body, the *handler* has already looked at the headers and
won't look at them again.

Is this correct?  If so, is there no way to do what I'm trying to do
other than to *be* the handler myself and issue a sub-request for each
request I want to inject?

Many thanks in advance.


View raw message