if (!LIST_ISEMPTY(&curproxy->filter_configs)) {
curproxy->fe_req_ana |= AN_REQ_FLT_START_FE | AN_REQ_FLT_XFER_DATA | AN_REQ_FLT_END;
curproxy->fe_rsp_ana |= AN_RES_FLT_START_FE | AN_RES_FLT_XFER_DATA | AN_RES_FLT_END;
- if (curproxy->mode == PR_MODE_HTTP) {
- curproxy->fe_req_ana |= AN_REQ_FLT_HTTP_HDRS;
- curproxy->fe_rsp_ana |= AN_RES_FLT_HTTP_HDRS;
- }
}
}
if (!LIST_ISEMPTY(&curproxy->filter_configs)) {
curproxy->be_req_ana |= AN_REQ_FLT_START_BE | AN_REQ_FLT_XFER_DATA | AN_REQ_FLT_END;
curproxy->be_rsp_ana |= AN_RES_FLT_START_BE | AN_RES_FLT_XFER_DATA | AN_RES_FLT_END;
- if (curproxy->mode == PR_MODE_HTTP) {
- curproxy->be_req_ana |= AN_REQ_FLT_HTTP_HDRS;
- curproxy->be_rsp_ana |= AN_RES_FLT_HTTP_HDRS;
- }
}
}
if (!(s->flags & SF_FINST_MASK))
s->flags |= SF_FINST_R;
+ if (HAS_FILTERS(s))
+ req->analysers |= AN_REQ_FLT_HTTP_HDRS;
+
/* enable the minimally required analyzers to handle keep-alive and compression on the HTTP response */
req->analysers &= (AN_REQ_HTTP_BODY | AN_REQ_FLT_HTTP_HDRS | AN_REQ_FLT_END);
req->analysers &= ~AN_REQ_FLT_XFER_DATA;
}
}
+ /* Filter the request headers if there are filters attached to the
+ * stream.
+ */
+ if (HAS_FILTERS(s))
+ req->analysers |= AN_REQ_FLT_HTTP_HDRS;
+
/* If we have no server assigned yet and we're balancing on url_param
* with a POST request, we may be interested in checking the body for
* that parameter. This will be done in another analyser.
if (!http_eval_after_res_rules(s))
goto return_int_err;
+ /* Filter the response headers if there are filters attached to the
+ * stream.
+ */
+ if (HAS_FILTERS(s))
+ rep->analysers |= AN_RES_FLT_HTTP_HDRS;
+
/* Always enter in the body analyzer */
rep->analysers &= ~AN_RES_FLT_XFER_DATA;
rep->analysers |= AN_RES_HTTP_XFER_BODY;
http_init_txn(s);
}
- /* Be sure to filter request headers if the backend is an HTTP proxy and
- * if there are filters attached to the stream. */
- if (s->be->mode == PR_MODE_HTTP && HAS_FILTERS(s))
- s->req.analysers |= AN_REQ_FLT_HTTP_HDRS;
-
if (s->txn) {
/* If we chain a TCP frontend to an HTX backend, we must upgrade
* the client mux */
rep->analysers |= strm_fe(s)->fe_rsp_ana | s->be->be_rsp_ana;
- /* Be sure to filter response headers if the backend is an HTTP proxy
- * and if there are filters attached to the stream. */
- if (IS_HTX_STRM(s) && HAS_FILTERS(s))
- rep->analysers |= AN_RES_FLT_HTTP_HDRS;
-
si_rx_endp_more(si);
rep->flags |= CF_READ_ATTACHED; /* producer is now attached */
if (objt_cs(si->end)) {