BUG/MINOR: hlua: Set conn-stream/channel EOI flags at the end of request
authorChristopher Faulet <cfaulet@haproxy.com>
Mon, 7 Mar 2022 14:50:54 +0000 (15:50 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Mon, 14 Mar 2022 10:02:37 +0000 (11:02 +0100)
This bug is the same than for the HTTP client. See "BUG/MINOR: httpclient:
Set conn-stream/channel EOI flags at the end of request" for details.

This patch must be backported as far as 2.0. But only CF_EOI must be set
because applets are not attached to a conn-stream on older versions.

(cherry picked from commit d8d2708cfef417e3c4e2f627089b49e030ebbe80)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
(cherry picked from commit 672f2633e7f8a213391e28982e266b366fda34dd)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
(cherry picked from commit 79c0fc714e75347d0b4d61ebed52983c118ee29c)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>

src/hlua.c

index 8a032c7..cace5a7 100644 (file)
@@ -7301,6 +7301,7 @@ void hlua_applet_http_fct(struct appctx *ctx)
                        goto out;
                }
                channel_add_input(res, 1);
+               res->flags |= CF_EOI;
                strm->txn->status = ctx->ctx.hlua_apphttp.status;
                ctx->ctx.hlua_apphttp.flags |= APPLET_RSP_SENT;
        }