]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: stats: Don't add end-of-data marker and trailers in the HTX response
authorChristopher Faulet <cfaulet@haproxy.com>
Wed, 21 Nov 2018 12:51:07 +0000 (13:51 +0100)
committerWilly Tarreau <w@1wt.eu>
Sat, 1 Dec 2018 16:37:27 +0000 (17:37 +0100)
Because the mux H1 is able to handle these blocks by itself, it is easier to
ignore them in the stats applet.

src/stats.c

index d0544a33632ffd88c446e20c2e609191d02f9c3d..c0de42961b9cc602042007783bf17f7a59bb844e 100644 (file)
@@ -3221,18 +3221,7 @@ static void htx_stats_io_handler(struct appctx *appctx)
        if (appctx->st0 == STAT_HTTP_DONE) {
                struct htx_blk *blk;
 
-               if (appctx->ctx.stats.flags & STAT_CHUNKED) {
-                       // FIXME: if trailers failed, do not add EOD twice
-                       if (!htx_add_endof(res_htx, HTX_BLK_EOD)) {
-                               si_rx_room_blk(si);
-                               goto out;
-                       }
-                       if (!htx_add_trailer(res_htx, ist("\r\n"))) {
-                               si_rx_room_blk(si);
-                               goto out;
-                       }
-                       appctx->ctx.stats.flags &= ~STAT_CHUNKED;
-               }
+               /* Don't add EOD and TLR because mux-h1 will take care of it */
                if (!htx_add_endof(res_htx, HTX_BLK_EOM)) {
                        si_rx_room_blk(si);
                        goto out;