Hi list,

I have a PerlAccessHandler which needs a copy of the POST data from the
client in order to perform some validation. If the POST data is valid, the
request is passed to mod_proxy which sends it to the backend server
(filter returns Apache2::Const::OK) If the POST data is invalid, it
returns Apache2::Const::FORBIDDEN.

My PerlAccessHandler gets the POST by reading the bucket brigades
directly. However, when the data is read, POST request body is no longer
available to mod_proxy which basically forwards only the headers and the
query to the backend server.

Originially, my PerlAccessHandler added an input filter (via
$r->add_input_filter) which went thru the POST data (using the streaming
API). In that scenario, mod_proxy gets the entire POST request body if my
input filter returned Apache2::Const::OK. However, when it returned
Apache2::Const::FORBIDDEN (the POST data was invalid) mod_proxy gives me
an error:

Unknown error: 404: proxy: prefetch request body failed

This didn't happend in Apache 2.0.54 but started in 2.0.55 which I'm
currently using together with mod_perl 2.0.2 (static build).

Any pointers on what I'm doing wrong?

Thanks,
/haver

Reply via email to