From: Christopher Faulet Date: Tue, 21 Jul 2026 12:06:26 +0000 (+0200) Subject: BUG/MINOR: hlua: Always return nil if there is no data to dup for HTTP messages X-Git-Url: https://git.kaiwu.me/?a=commitdiff_plain;h=80520e52dd445f9fdffd6956e59d52ac9ca74386;p=haproxy.git BUG/MINOR: hlua: Always return nil if there is no data to dup for HTTP messages In _hlua_http_msg_dup(), we must always return nil if no data was duplicated. The fact the end of the message was reached or not should not interfere. So let's remove the extra condition on HTX_FL_EOM flag and always return nil if no data was duplicated. This patch could be backported to all supported versions. --- diff --git a/src/hlua.c b/src/hlua.c index 38f82182e..7bdd3d4b7 100644 --- a/src/hlua.c +++ b/src/hlua.c @@ -7342,15 +7342,13 @@ static int _hlua_http_msg_dup(struct http_msg *msg, lua_State *L, size_t offset, break; default: - if (!ret) - goto no_data; goto end; } offset = 0; } -end: - if (!ret && (htx->flags & HTX_FL_EOM)) + end: + if (!ret) goto no_data; luaL_pushresult(&b); return ret;