]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MEDIUM: mux-h1: Support zero-copy forwarding for chunks with an unknown size
authorChristopher Faulet <cfaulet@haproxy.com>
Thu, 25 Jan 2024 14:00:10 +0000 (15:00 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Wed, 7 Feb 2024 14:04:44 +0000 (15:04 +0100)
commit91b77c16328a745ce05695a57df35228d2ae12b9
treec6726eeca2e26b1331731fed071be98887d1e929
parentdcb964f8db45d6bcd367ad6f587c49b9727cfa50
MEDIUM: mux-h1: Support zero-copy forwarding for chunks with an unknown size

Till now, for chunked messages, the H1 mux used the size requested during
the zero-copy forwarding negotiation as the chunk size. And till now, this
was accurate because the requested size was indeed the chunk size on the
producer side.

But this will be a problem to implement the zero-copy forwarding on some
applets because the content size is not known during the nego but only when
it is produced. Thanks to previous patches, it is now possible to know the
requested size is not exact and we are able to reserve a larger space to
write the chunk size later, in h1_done_ff(), with some padding.
src/mux_h1.c