From: Christopher Faulet Date: Tue, 15 Sep 2026 11:59:50 +0000 (+0200) Subject: MINOR: mux-h1: Handle RAW_DATA blocks when sending data X-Git-Tag: v3.5-dev8~147 X-Git-Url: https://git.kaiwu.me/?a=commitdiff_plain;h=87e4de9d7df40a188e50f0ee5b273b2f627dd6b6;p=haproxy.git MINOR: mux-h1: Handle RAW_DATA blocks when sending data Tunneled data are now stored in RAW_DATA blocks. The H1 multiplexer must be able to send them. h1_make_tunnel() is responsible to do so. For the H1 multiplexer, there is no difference with HTTP data: both are sent verbatim. Only the ability to handle the new type is added here. No producer emits such block yet so h1_make_tunnel() relies on htx_is_data_type() for now. But once all changes done, this will have to be modified to accept RAW_DATA blocks only. --- diff --git a/src/mux_h1.c b/src/mux_h1.c index 329f34a85..63ba86fe4 100644 --- a/src/mux_h1.c +++ b/src/mux_h1.c @@ -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_get_blk_type(blk) == HTX_BLK_DATA && + htx_is_data_type(htx_get_blk_type(blk)) && 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 (type == HTX_BLK_DATA) { + if (htx_is_data_type(type)) { if (vlen > count) { /* Get the maximum amount of data we can xferred */ vlen = count;