From e79af3d846fe853f04ee80afca37d384773edca8 Mon Sep 17 00:00:00 2001 From: Christopher Faulet Date: Mon, 22 Jun 2026 07:57:51 +0200 Subject: [PATCH] BUG/MEDIUM: hlua: Properly report EOS when http applet exits When the Lua HTTP applet was migrated to the new API to use its own buffers, a regression was introduced. The EOS flag at the end of the response was no longer set. While it is not an issue when the response length is known (because of a content-length or a transfer-encoding header), it is an issue for responses with an unkown payload size. For the stconn and the stream, in that case, the EOS is used to detect the end of the response. Without this info, the stream remains blocked. To fix the issue, the EOS flag is now set as expected on the applet. This patch should fix the issue #3422. It must be backport as far as 3.3. --- src/hlua.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/hlua.c b/src/hlua.c index 0a90df6eb..c50fb20b1 100644 --- a/src/hlua.c +++ b/src/hlua.c @@ -11078,6 +11078,7 @@ void hlua_applet_http_fct(struct appctx *ctx) res_htx->flags |= HTX_FL_EOM; htx_to_buf(res_htx, outbuf); applet_set_eoi(ctx); + applet_set_eos(ctx); http_ctx->flags |= APPLET_RSP_SENT; }