From bf45c72a4f39048a7e329dfbc98a39ad9f9c2f8a Mon Sep 17 00:00:00 2001 From: William Lallemand Date: Fri, 14 Jan 2022 17:59:01 +0100 Subject: [PATCH] BUG/MINOR: httpclient/lua: don't pop the lua stack when getting headers hlua_httpclient_table_to_hdrs() does a lua_pop(L, 1) at the end of the function, this is supposed to be done in the caller and it is already be done in hlua_httpclient_send(). This call has the consequence of poping the next parameter of the httpclient, ignoring it. This patch fixes the issue by removing the lua_pop(L, 1). Must be backported in 2.5. (cherry picked from commit 01e2be84d746c5203f7c5723bb6ca9e469026c3d) Signed-off-by: Willy Tarreau --- src/hlua.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/hlua.c b/src/hlua.c index 8dea91e..8da64ee 100644 --- a/src/hlua.c +++ b/src/hlua.c @@ -7097,7 +7097,6 @@ struct http_hdr *hlua_httpclient_table_to_hdrs(lua_State *L) } skip_headers: - lua_pop(L, 1); return result; } -- 1.7.10.4