MEDIUM: stream: move HTTP request body analyser before process_common
Since 1.5, the request body analyser has become independant from any other element and does not even disturb the message forwarder anymore. And since it's disabled by default, we can place it before most analysers so that it's can preempt any other one if an intermediary one enables it.
This commit is contained in:
parent
f69d4ff006
commit
748179eb5a
|
@ -136,14 +136,14 @@
|
|||
/* unused: 0x00000001 */
|
||||
#define AN_REQ_INSPECT_FE 0x00000002 /* inspect request contents in the frontend */
|
||||
#define AN_REQ_WAIT_HTTP 0x00000004 /* wait for an HTTP request */
|
||||
#define AN_REQ_HTTP_PROCESS_FE 0x00000008 /* process the frontend's HTTP part */
|
||||
#define AN_REQ_SWITCHING_RULES 0x00000010 /* apply the switching rules */
|
||||
#define AN_REQ_INSPECT_BE 0x00000020 /* inspect request contents in the backend */
|
||||
#define AN_REQ_HTTP_PROCESS_BE 0x00000040 /* process the backend's HTTP part */
|
||||
#define AN_REQ_SRV_RULES 0x00000080 /* use-server rules */
|
||||
#define AN_REQ_HTTP_INNER 0x00000100 /* inner processing of HTTP request */
|
||||
#define AN_REQ_HTTP_TARPIT 0x00000200 /* wait for end of HTTP tarpit */
|
||||
#define AN_REQ_HTTP_BODY 0x00000400 /* inspect HTTP request body */
|
||||
#define AN_REQ_HTTP_BODY 0x00000008 /* wait for HTTP request body */
|
||||
#define AN_REQ_HTTP_PROCESS_FE 0x00000010 /* process the frontend's HTTP part */
|
||||
#define AN_REQ_SWITCHING_RULES 0x00000020 /* apply the switching rules */
|
||||
#define AN_REQ_INSPECT_BE 0x00000040 /* inspect request contents in the backend */
|
||||
#define AN_REQ_HTTP_PROCESS_BE 0x00000080 /* process the backend's HTTP part */
|
||||
#define AN_REQ_SRV_RULES 0x00000100 /* use-server rules */
|
||||
#define AN_REQ_HTTP_INNER 0x00000200 /* inner processing of HTTP request */
|
||||
#define AN_REQ_HTTP_TARPIT 0x00000400 /* wait for end of HTTP tarpit */
|
||||
#define AN_REQ_STICKING_RULES 0x00000800 /* table persistence matching */
|
||||
#define AN_REQ_PRST_RDP_COOKIE 0x00001000 /* persistence on rdp cookie */
|
||||
#define AN_REQ_HTTP_XFER_BODY 0x00002000 /* forward request body */
|
||||
|
|
12
src/stream.c
12
src/stream.c
|
@ -1669,6 +1669,12 @@ struct task *process_stream(struct task *t)
|
|||
UPDATE_ANALYSERS(req->analysers, ana_list, ana_back, AN_REQ_WAIT_HTTP);
|
||||
}
|
||||
|
||||
if (ana_list & AN_REQ_HTTP_BODY) {
|
||||
if (!http_wait_for_request_body(s, req, AN_REQ_HTTP_BODY))
|
||||
break;
|
||||
UPDATE_ANALYSERS(req->analysers, ana_list, ana_back, AN_REQ_HTTP_BODY);
|
||||
}
|
||||
|
||||
if (ana_list & AN_REQ_HTTP_PROCESS_FE) {
|
||||
if (!http_process_req_common(s, req, AN_REQ_HTTP_PROCESS_FE, sess->fe))
|
||||
break;
|
||||
|
@ -1711,12 +1717,6 @@ struct task *process_stream(struct task *t)
|
|||
UPDATE_ANALYSERS(req->analysers, ana_list, ana_back, AN_REQ_HTTP_INNER);
|
||||
}
|
||||
|
||||
if (ana_list & AN_REQ_HTTP_BODY) {
|
||||
if (!http_wait_for_request_body(s, req, AN_REQ_HTTP_BODY))
|
||||
break;
|
||||
UPDATE_ANALYSERS(req->analysers, ana_list, ana_back, AN_REQ_HTTP_BODY);
|
||||
}
|
||||
|
||||
if (ana_list & AN_REQ_PRST_RDP_COOKIE) {
|
||||
if (!tcp_persist_rdp_cookie(s, req, AN_REQ_PRST_RDP_COOKIE))
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue