From: William Lallemand Date: Tue, 15 Mar 2022 09:52:07 +0000 (+0100) Subject: BUG/MINOR: httpclient/lua: stuck when closing without data X-Git-Tag: v2.6-dev4~72 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8f170c7fcacbf8576197b6356b73290fd2e3b082;p=thirdparty%2Fhaproxy.git BUG/MINOR: httpclient/lua: stuck when closing without data The httpclient lua code is lacking the end callback, which means it won't be able to wake up the lua code after a longjmp if the connection was closed without any data. Must be backported to 2.5. --- diff --git a/src/hlua.c b/src/hlua.c index 34d271f685..b8dd0c7598 100644 --- a/src/hlua.c +++ b/src/hlua.c @@ -7293,6 +7293,7 @@ __LJMP static int hlua_httpclient_send(lua_State *L, enum http_meth_t meth) hlua_hc->hc->ops.res_stline = hlua_httpclient_cb; hlua_hc->hc->ops.res_headers = hlua_httpclient_cb; hlua_hc->hc->ops.res_payload = hlua_httpclient_cb; + hlua_hc->hc->ops.res_end = hlua_httpclient_cb; /* a body is available, it will use the request callback */ if (body_str) {