]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MEDIUM: mux-h2: fix early close with option abortonclose
authorWilly Tarreau <w@1wt.eu>
Sat, 15 Jun 2019 07:55:50 +0000 (09:55 +0200)
committerWilly Tarreau <w@1wt.eu>
Sat, 15 Jun 2019 08:04:09 +0000 (10:04 +0200)
commit76c83826db63f8d613cdb74e32d2642eb05e2458
tree3292ac7012720438bc9dd5a3da6ba6e270f4535f
parentbd20a9dd4e9b54e367436b7471847442b1eb91f5
BUG/MEDIUM: mux-h2: fix early close with option abortonclose

Olivier found that commit 99ad1b3e8 ("MINOR: mux-h2: stop relying on
CS_FL_REOS") managed to break abortonclose again with H2. What happens
is that while the CS_FL_REOS flag was set on some transitions to the
HREM state, it's not set on all and is in fact only set when the low
level connection is closed. So making the replacement condition match
the HREM and ERROR states is not correct and causes completely correct
requests to send advertise an early close of the connection layer while
only the stream's input is closed.

In order to avoid this, we now properly split the checks for the CLOSED
state and for the closed connection. This way there is no risk to set
the EOS flag too early on the connection.

No backport is needed.
src/mux_h2.c