]> git.kaiwu.me - haproxy.git/commitdiff
MINOR: stats-html: Detect a complete request by testing flags on the tail bloc
authorChristopher Faulet <cfaulet@haproxy.com>
Thu, 9 Jul 2026 14:17:46 +0000 (16:17 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Fri, 18 Sep 2026 15:05:18 +0000 (17:05 +0200)
In the HTTP stats applet, when a POST is received, instead of testing the
HTX_FL_HAS_EOM flag on the message itself, we are now relying on the tail
bloc to know if the end of the request was received or not, by testing its
flags.

src/stats-html.c

index ad018d7affbef2a11ee8a4ab05f7c1255c954a48..2a98e1d35eb3667982c96f1e2a05e0cd65973329 100644 (file)
@@ -1688,7 +1688,8 @@ static int stats_process_http_post(struct stconn *sc)
        struct htx_blk *blk;
 
        /*  we need more data */
-       if (!(htx->flags & HTX_FL_HAS_EOM)) {
+       blk = ASSUME_NONNULL(htx_get_tail_blk(htx));
+       if (!(blk->flags & HTX_BLK_FL_EOM)) {
                /* check if we can receive more */
                if (applet_fl_test(appctx, APPCTX_FL_INBLK_FULL)) {
                        ctx->st_code = STAT_STATUS_EXCD;