BUG/MEDIUM: mux-h2: Fix dfl calculation when merging CONTINUATION frames
authorChristopher Faulet <cfaulet@haproxy.com>
Wed, 21 Apr 2021 09:11:21 +0000 (11:11 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Wed, 21 Apr 2021 10:13:12 +0000 (12:13 +0200)
commitcb1847c77285ba6dbd413774fcf2282cafa19bd2
treebfb9f7c560538fdca6cf8065c08ed7ef061eb823
parent07f88d7582c80522b1e83b9bbc473d338e48fb85
BUG/MEDIUM: mux-h2: Fix dfl calculation when merging CONTINUATION frames

When header are splitted over several frames, payload of HEADERS and
CONTINUATION frames are merged to form a unique HEADERS frame before
decoding the payload. To do so, info about the current frame are updated
(dff, dfl..) with info of the next one. Here there is a bug when the frame
length (dfl) is update. We must add the next frame length (hdr.dfl) and not
only the amount of data found in the buffer (clen). Because HEADERS frames
are decoded in one pass, dfl value is the whole frame length or 0. nothing
intermediary.

This patch must be backported as far as 2.0.
src/mux_h2.c