]> git.kaiwu.me - haproxy.git/commitdiff
MINOR: compression: Rely on HTX block flags to detect the end of message
authorChristopher Faulet <cfaulet@haproxy.com>
Wed, 8 Jul 2026 15:06:04 +0000 (17:06 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Fri, 18 Sep 2026 15:05:18 +0000 (17:05 +0200)
Thanks to previous patches, instead of testing HTX_FL_HAS_EOM flag to detect
the end of the message, we now rely on the flags on the HTX block.

src/flt_http_comp.c

index f97c2328837a3737390eb45a7102fcfb7180279c..e02e85eb8c2f0b2237af7b1f9b773af1e4c40b7b 100644 (file)
@@ -313,7 +313,7 @@ comp_http_payload(struct stream *s, struct filter *filter, struct http_msg *msg,
                switch (type) {
                        case HTX_BLK_DATA:
                                /* it is the last data block */
-                               last = (!next && (st->flags & COMP_STATE_EOM_SEEN));
+                               last = (blk->flags & HTX_BLK_FL_EOM);
                                v = htx_get_blk_value(htx, blk);
                                v = istadv(v, offset);
                                if (v.len > len) {