When the Lua HTTP applet was migrated to the new API to use its own buffers,
a regression was introduced. The EOS flag at the end of the response was no
longer set. While it is not an issue when the response length is known
(because of a content-length or a transfer-encoding header), it is an issue
for responses with an unkown payload size. For the stconn and the stream, in
that case, the EOS is used to detect the end of the response. Without this
info, the stream remains blocked.
To fix the issue, the EOS flag is now set as expected on the applet.
This patch should fix the issue #3422. It must be backport as far as 3.3.
res_htx->flags |= HTX_FL_EOM;
htx_to_buf(res_htx, outbuf);
applet_set_eoi(ctx);
+ applet_set_eos(ctx);
http_ctx->flags |= APPLET_RSP_SENT;
}