BUG/MEDIUM: mux-h1: Disable splicing for chunked messages
authorChristopher Faulet <cfaulet@haproxy.com>
Tue, 5 Nov 2019 15:24:27 +0000 (16:24 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Wed, 6 Nov 2019 09:14:27 +0000 (10:14 +0100)
commit9fa40c46df5f52692fe62be008131f8dfa4d83af
tree5758e0390afb8eddc54691a565820f581a5e914f
parentb6f759b43d1a6d8baa2394c275d6de277be15e84
BUG/MEDIUM: mux-h1: Disable splicing for chunked messages

The mux H1 announces the support of the TCP splicing. It only works for payload
data. It works for messages with an explicit content-length or for tunnelled
data. For chunked messages, the mux H1 should normally not try to xfer more than
the current chunk through the pipe. Unfortunately, this works on the read side
but the send is completely bogus. During the output formatting, the announced
size of chunks does not handle the size that will be spliced. Because there is
no formatting when spliced data are sent, the produced message is malformed and
rejected by the peer.

For now, because it is quick and simple, the TCP splicing is disabled for
chunked messages. I will try to enable it again in a proper way. I don't know
for now if it will be backportable in previous versions. This will depend on the
amount of changes required to handle it.

This patch fixes a part of the issue #356. It must be backported to 2.0 and 1.9.
src/mux_h1.c