]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MEDIUM: h2: fix handling of end of stream again
authorWilly Tarreau <w@1wt.eu>
Thu, 7 Dec 2017 14:59:29 +0000 (15:59 +0100)
committerWilly Tarreau <w@1wt.eu>
Thu, 7 Dec 2017 18:20:35 +0000 (19:20 +0100)
commit0249219be8080df56f40cf147fecf3eafe050074
tree6c2d5fc3e941f135ae247144d0b9d105074d4f65
parentdbd026792ac4d1cb9a2c14e7f10946fc86a4f6de
BUG/MEDIUM: h2: fix handling of end of stream again

Commit 9470d2c ("BUG/MINOR: h2: try to abort closed streams as
soon as possible") tried to address the situations where a stream
is closed by the client, but caused a side effect which is that in
some cases, a regularly closed stream reports an error to the stream
layer. The reason is that we purposely matched H2_SS_CLOSED in the
test for H2_SS_ERROR to report this so that we can check for RST,
but it accidently catches certain end of transfers as well. This
results in valid requests to report flags "CD" in the logs.

Instead, let's roll back to detecting H2_SS_ERROR and explicitly check
for a received RST. This way we can correctly abort transfers without
mistakenly reporting errors in normal situations.

This fix needs to be backported to 1.8 as the fix above was merged into
1.8.1.
src/mux_h2.c