From cd9084f77683106ace2fb863080e7d10e71c39fc Mon Sep 17 00:00:00 2001 From: Thierry FOURNIER Date: Sat, 7 Mar 2015 15:11:09 +0100 Subject: [PATCH] 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. --- src/hlua.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/hlua.c b/src/hlua.c index 0923cfd0a..75dd07742 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;