]> 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, 24 Jul 2026 10:20:47 +0000 (12:20 +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 533da726d5e073408ba25ed437f0d7b44404a67a..e6d020fc3a2c68d83c10deaf716ce5c81f65700e 100644 (file)
@@ -1668,7 +1668,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;