Hi Nick, On Wed, Apr 27, 2011 at 06:39:49PM +0100, Nick Kew wrote: > You may be a little confused. Subrquests and internal redirects > are not the same thing, and serve different purposes. [...]
You're right, what I want is an internal redirect from within my input filter, not a subrequest. > A subrequest should be OK in a filter, but if it generates any output > you'd need to figure out where to send it - which is not obvious in > an input filter. As for an internal redirect, I don't see how it would > make sense, but I haven't tried. I've just tried it with ap_internal_redirect(), and the redirected request indeed gets processed almost as intended. I've still following issues with this approach: 1.) Additional to the redirected request, the original request ends up at the backend server too. Only if I return from the input filter with something non-zero, the request doesn't reach the backend server. But in this case a "proxy: prefetch request body failed "... error is logged by ap_proxy_http_request(). From reading the whole code of ap_proxy_http_request() I wonder whether internal redirects calling what ever redirect function from input filters are supported at all. 2.) The redirected request seems to inherit the request method from the originial request. This is not what I want. The input filter operates on the request body of a POST request, but the internal redirection should do a GET request. What else do you suggest? Should I parse the request body in a content handler instead inside an input filter? Thanks in advance for your feedback. Regards, Micha