]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MEDIUM: mux-h2: do not abort HEADERS frame before decoding them
authorWilly Tarreau <w@1wt.eu>
Wed, 30 Jan 2019 15:58:30 +0000 (16:58 +0100)
committerWilly Tarreau <w@1wt.eu>
Wed, 30 Jan 2019 18:36:21 +0000 (19:36 +0100)
commit8d9ac3ed8b02c98c42f87a21a387c5d6446d834e
tree1644ee4623739244971ab96acab50b2b77d3c5bb
parent24ff1f834151727cb107995b72a72e9992fd8159
BUG/MEDIUM: mux-h2: do not abort HEADERS frame before decoding them

If a response HEADERS frame arrives on a closed connection (due to a
client abort sending an RST_STREAM), it's currently immediately rejected
with an RST_STREAM, like any other frame. This is incorrect, as HEADERS
frames must first be decoded to keep the HPACK decoder synchronized,
possibly breaking subsequent responses.

This patch excludes HEADERS/CONTINUATION/PUSH_PROMISE frames from the
central closed state test and leaves to the respective frame parsers
the responsibility to decode the frame then send RST_STREAM.

This fix must be backported to 1.9. 1.8 is not directly impacted since
it doesn't have response HEADERS nor trailers thus cannot recover from
such situations anyway.
src/mux_h2.c