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.
This commit is contained in:
William Lallemand 2022-03-15 10:52:07 +01:00
parent e9a974a37a
commit 8f170c7fca

View File

@ -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) {