MEDIUM: channel: wake up any request analyzer on response activity

This behavior is already existing for the "WAIT_HTTP" analyzer,
this patch just extends the system to any analyzer that would
be waked up on response activity.
This commit is contained in:
Thierry FOURNIER 2015-02-26 10:40:09 +01:00 committed by Willy Tarreau
parent bb2ae64b82
commit b83862dd74
2 changed files with 3 additions and 2 deletions

View File

@ -148,6 +148,7 @@
#define AN_REQ_STICKING_RULES 0x00000800 /* table persistence matching */ #define AN_REQ_STICKING_RULES 0x00000800 /* table persistence matching */
#define AN_REQ_PRST_RDP_COOKIE 0x00001000 /* persistence on rdp cookie */ #define AN_REQ_PRST_RDP_COOKIE 0x00001000 /* persistence on rdp cookie */
#define AN_REQ_HTTP_XFER_BODY 0x00002000 /* forward request body */ #define AN_REQ_HTTP_XFER_BODY 0x00002000 /* forward request body */
#define AN_REQ_ALL 0x00003ffe /* all of the request analysers */
/* response analysers */ /* response analysers */
#define AN_RES_INSPECT 0x00010000 /* content inspection */ #define AN_RES_INSPECT 0x00010000 /* content inspection */

View File

@ -2103,14 +2103,14 @@ struct task *process_session(struct task *t)
unsigned int flags = s->rep->flags; unsigned int flags = s->rep->flags;
if ((s->rep->flags & CF_MASK_ANALYSER) && if ((s->rep->flags & CF_MASK_ANALYSER) &&
(s->rep->analysers & AN_REQ_WAIT_HTTP)) { (s->rep->analysers & AN_REQ_ALL)) {
/* Due to HTTP pipelining, the HTTP request analyser might be waiting /* Due to HTTP pipelining, the HTTP request analyser might be waiting
* for some free space in the response buffer, so we might need to call * for some free space in the response buffer, so we might need to call
* it when something changes in the response buffer, but still we pass * it when something changes in the response buffer, but still we pass
* it the request buffer. Note that the SI state might very well still * it the request buffer. Note that the SI state might very well still
* be zero due to us returning a flow of redirects! * be zero due to us returning a flow of redirects!
*/ */
s->rep->analysers &= ~AN_REQ_WAIT_HTTP; s->rep->analysers &= ~AN_REQ_ALL;
s->req->flags |= CF_WAKE_ONCE; s->req->flags |= CF_WAKE_ONCE;
} }