From b83862dd74c27baf45d05542536aa82c803f54bf Mon Sep 17 00:00:00 2001 From: Thierry FOURNIER Date: Thu, 26 Feb 2015 10:40:09 +0100 Subject: [PATCH] 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. --- include/types/channel.h | 1 + src/session.c | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/include/types/channel.h b/include/types/channel.h index 8bc395830..7640caed3 100644 --- a/include/types/channel.h +++ b/include/types/channel.h @@ -148,6 +148,7 @@ #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 */ +#define AN_REQ_ALL 0x00003ffe /* all of the request analysers */ /* response analysers */ #define AN_RES_INSPECT 0x00010000 /* content inspection */ diff --git a/src/session.c b/src/session.c index 31a5182c1..063cbb8d5 100644 --- a/src/session.c +++ b/src/session.c @@ -2103,14 +2103,14 @@ struct task *process_session(struct task *t) unsigned int flags = s->rep->flags; 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 * 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 the request buffer. Note that the SI state might very well still * 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; }