]> 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, 24 Jul 2026 10:20:47 +0000 (12:20 +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 55feab80de55faf5f7c72771d4579caedd196ab6..a3ace6a5a99719e0c06f162c0cbac838a2f296d8 100644 (file)
@@ -297,7 +297,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 && (htx->flags & HTX_FL_HAS_EOM)) || (next && htx_get_blk_type(next) != HTX_BLK_DATA));
+                               last = ((blk->flags & HTX_BLK_FL_EOM) || (next && htx_get_blk_type(next) != HTX_BLK_DATA));
                                v = htx_get_blk_value(htx, blk);
                                v = istadv(v, offset);
                                if (v.len > len) {