]> git.kaiwu.me - haproxy.git/commit
MEDIUM: mux-h1: Use RAW_DATA blocks to store tunneled data
authorChristopher Faulet <cfaulet@haproxy.com>
Tue, 15 Sep 2026 12:00:08 +0000 (14:00 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Fri, 18 Sep 2026 15:05:19 +0000 (17:05 +0200)
commit8112922e32afa4f92d34bf2576718d502a500fc8
tree657b6ebe903f7d3c30e9831de6a0558ca6c1464a
parent846e24be7c58ebb3679310e437efeb549326e65c
MEDIUM: mux-h1: Use RAW_DATA blocks to store tunneled data

When a H1 stream is switched in tunnel mode, the transfer length is unknown
and the data are read till the shutdown. This is exactly the same code path
than a message without any transfer length information. So the block type to
use is chosen depending on the parser state: in H1_MSG_TUNNEL state, the
data are tunneled data and a RAW_DATA block is used. Otherwise it is still an
HTTP payload and a DATA block is used.

h1_copy_msg_data() takes the block type as extra argument for that purpose.

Thanks to this change, HTTP data and tunneled data are no longer mixed on
the H1 side. It also means the end of the message, reported just after the
headers for a tunneled stream, is now preserved when tunneled data are
received.
src/h1_htx.c