From: Thierry FOURNIER Date: Sat, 7 Mar 2015 14:11:09 +0000 (+0100) Subject: BUG/MEDIUM: lua: can't handle the response bytes X-Git-Tag: v1.6-dev1~54 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=cd9084f77683106ace2fb863080e7d10e71c39fc;p=thirdparty%2Fhaproxy.git BUG/MEDIUM: lua: can't handle the response bytes 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. --- diff --git a/src/hlua.c b/src/hlua.c index 0923cfd0a4..75dd07742b 100644 --- a/src/hlua.c +++ b/src/hlua.c @@ -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;