]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MEDIUM: lua: can't handle the response bytes
authorThierry FOURNIER <tfournier@exceliance.fr>
Sat, 7 Mar 2015 14:11:09 +0000 (15:11 +0100)
committerWilly Tarreau <w@1wt.eu>
Mon, 9 Mar 2015 16:50:42 +0000 (17:50 +0100)
The request action can't handle the reponse trafic because its
automatically forwarded. The forard with CHN_INFINITE_FORWARD
is set because any anamizers are registered on  the response
channel.

This patch automatically register the request analyzer on the
reponse channel when its yield. This prevent the automatic
tranfer of the response bytes.

src/hlua.c

index 0923cfd0a418cc44d75342cace6fcbabe3465c70..75dd07742b4b7d8748f1ec0f3cd0bec4516b2eb3 100644 (file)
@@ -3343,9 +3343,9 @@ static int hlua_request_act_wrapper(struct hlua_rule *rule, struct proxy *px,
                 */
                if (HLUA_IS_WAKERESWR(&s->hlua)) {
                        s->rep->flags |= CF_WAKE_WRITE;
-                       if ((analyzer & (AN_REQ_INSPECT_FE|AN_REQ_HTTP_PROCESS_FE)))
-                               s->rep->analysers |= analyzer;
                }
+               if ((analyzer & (AN_REQ_INSPECT_FE|AN_REQ_HTTP_PROCESS_FE)))
+                       s->rep->analysers |= analyzer;
                if (HLUA_IS_WAKEREQWR(&s->hlua))
                        s->req->flags |= CF_WAKE_WRITE;
                return 0;