]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MEDIUM: mux-h2: support emitting CONTINUATION frames after HEADERS
authorWilly Tarreau <w@1wt.eu>
Mon, 7 Oct 2019 14:56:34 +0000 (16:56 +0200)
committerWilly Tarreau <w@1wt.eu>
Mon, 7 Oct 2019 16:18:32 +0000 (18:18 +0200)
commitcb985a4da69267df97d31af252b0947aa2181dd7
tree7e09d2ce76048a6d6f43aafd11b5a70d68828088
parent81bef7e89993c963d934eab21cca744cb6a6cb03
MEDIUM: mux-h2: support emitting CONTINUATION frames after HEADERS

There are some reports of users not being able to pass "enterprise"
traffic through haproxy when using H2 because it doesn't emit CONTINUATION
frames and as such is limited to headers no longer than the negociated
max-frame-size which usually is 16 kB.

This patch implements support form emitting CONTINUATION when a HEADERS
frame cannot fit within a limit of mfs. It does this by first filling a
buffer-wise frame, then truncating it starting from the tail to append
CONTINUATION frames. This makes sure that we can truncate on any byte
without being forced to stop on a header boundary, and ensures that the
common case (no fragmentation) doesn't add any extra cost. By moving
the tail first we make sure that each byte is moved only once, thus the
performance impact remains negligible.

This addresses github issue #249.
src/mux_h2.c