diff --git a/src/stats.c b/src/stats.c index ac36ebe0a..5379332ca 100644 --- a/src/stats.c +++ b/src/stats.c @@ -4316,7 +4316,18 @@ static void http_stats_io_handler(struct appctx *appctx) } if (appctx->st0 == STAT_HTTP_DONE) { - /* no more data are expected. Don't add TLR because mux-h1 will take care of it */ + /* no more data are expected. If the response buffer is empty, + * be sure to add something (EOT block in this case) to have + * something to send. It is important to be sure the EOM flags + * will be handled by the endpoint. + */ + if (htx_is_empty(res_htx)) { + if (!htx_add_endof(res_htx, HTX_BLK_EOT)) { + si_rx_room_blk(si); + goto out; + } + channel_add_input(res, 1); + } res_htx->flags |= HTX_FL_EOM; si->cs->flags |= CS_FL_EOI; res->flags |= CF_EOI;