]> git.kaiwu.me - haproxy.git/commitdiff
MINOR: mux-h1: Only handle RAW_DATA blocks when emitting tunneled data
authorChristopher Faulet <cfaulet@haproxy.com>
Fri, 18 Sep 2026 08:11:16 +0000 (10:11 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Fri, 18 Sep 2026 15:05:19 +0000 (17:05 +0200)
As expected, now the changes to properly handle the RAW_DATA blocs were
performed, the h1_make_tunnel() function is updated to only handle RAW_DATA
blocks.

src/mux_h1.c

index 63ba86fe4d533b47a0b399f96252e48184d46eaf..5ae5a7bae3fc16c696fd71db4b9d21650899b031 100644 (file)
@@ -3326,7 +3326,7 @@ static size_t h1_make_tunnel(struct h1s *h1s, struct h1m *h1m, struct buffer *bu
         */
        if (!b_data(&h1c->obuf) &&
            htx_nbblks(htx) == 1 &&
-           htx_is_data_type(htx_get_blk_type(blk)) &&
+           htx_get_blk_type(blk) == HTX_BLK_RAW_DATA &&
            htx_get_blksz(blk) == count &&
            b_size(&h1c->obuf) == b_size(buf)) {
                void *old_area;
@@ -3358,7 +3358,7 @@ static size_t h1_make_tunnel(struct h1s *h1s, struct h1m *h1m, struct buffer *bu
                sz = htx_get_blksz(blk);
                vlen = sz;
 
-               if (htx_is_data_type(type)) {
+               if (type == HTX_BLK_RAW_DATA) {
                        if (vlen > count) {
                                /* Get the maximum amount of data we can xferred */
                                vlen = count;