Updated input filter insertion code for sub-requests.

This commit is contained in:
brectanus 2007-10-17 23:07:00 +00:00
parent 8e99090067
commit 2b346dd086
2 changed files with 3 additions and 4 deletions

View File

@ -41,8 +41,8 @@ apr_status_t input_filter(ap_filter_t *f, apr_bucket_brigade *bb_out,
msr->r = f->r; msr->r = f->r;
if (msr->phase > PHASE_REQUEST_BODY) { if (msr->phase < PHASE_REQUEST_BODY) {
msr_log(msr, 1, "Internal error: Still in input filter in phase %d", msr->phase); msr_log(msr, 1, "Internal error: REQUEST_BODY phase incomplete for input filter in phase %d", msr->phase);
return APR_EGENERAL; return APR_EGENERAL;
} }

View File

@ -901,7 +901,7 @@ static void hook_insert_filter(request_rec *r) {
ap_add_input_filter("MODSECURITY_IN", msr, r, r->connection); ap_add_input_filter("MODSECURITY_IN", msr, r, r->connection);
} }
/* This function needs to run only once per transaction /* The output filters only need to be added only once per transaction
* (i.e. subrequests and redirects are excluded). * (i.e. subrequests and redirects are excluded).
*/ */
if ((r->main != NULL)||(r->prev != NULL)) { if ((r->main != NULL)||(r->prev != NULL)) {
@ -916,7 +916,6 @@ static void hook_insert_filter(request_rec *r) {
ap_add_output_filter("PDFP_OUT", msr, r, r->connection); ap_add_output_filter("PDFP_OUT", msr, r, r->connection);
/* Only proceed to add the second filter if the engine is enabled. */ /* Only proceed to add the second filter if the engine is enabled. */
// TODO: Do we need this anymore?
if (msr->txcfg->is_enabled == 0) { if (msr->txcfg->is_enabled == 0) {
if (msr->txcfg->debuglog_level >= 4) { if (msr->txcfg->debuglog_level >= 4) {
msr_log(msr, 4, "Hook insert_filter: Processing disabled, skipping."); msr_log(msr, 4, "Hook insert_filter: Processing disabled, skipping.");