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.
This commit is contained in:
Thierry FOURNIER 2015-03-07 15:11:09 +01:00 committed by Willy Tarreau
parent cae49c9ee8
commit cd9084f776

View 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;