]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: httpclient/lua: don't pop the lua stack when getting headers
authorWilliam Lallemand <wlallemand@haproxy.org>
Fri, 14 Jan 2022 16:59:01 +0000 (17:59 +0100)
committerWilliam Lallemand <wlallemand@haproxy.org>
Fri, 14 Jan 2022 19:51:31 +0000 (20:51 +0100)
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.

src/hlua.c

index 8dea91e758329d132f0cb4e8fdbae1ff61833964..8da64eed6750121e7b09b0f328d9b98ec7fea235 100644 (file)
@@ -7097,7 +7097,6 @@ struct http_hdr *hlua_httpclient_table_to_hdrs(lua_State *L)
        }
 
 skip_headers:
-       lua_pop(L, 1);
 
        return result;
 }