]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MEDIUM: channel: wake up any request analyzer on response activity
authorThierry FOURNIER <tfournier@haproxy.com>
Thu, 26 Feb 2015 09:40:09 +0000 (10:40 +0100)
committerWilly Tarreau <w@1wt.eu>
Sat, 28 Feb 2015 22:12:31 +0000 (23:12 +0100)
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
src/session.c

index 8bc395830348c5e2c318e9d3a9c87646b5405929..7640caed3d9f2d5d8e93cc9c433cb40393604e06 100644 (file)
 #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 */
index 31a5182c10c7c48f95da1a1b90249532935827ca..063cbb8d5d12a2d9936a3f3e0f0f513dbbada6e9 100644 (file)
@@ -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;
                }