]> git.kaiwu.me - haproxy.git/commit
MINOR: h2: handle two extra stream states for errors
authorWilly Tarreau <w@1wt.eu>
Mon, 16 Oct 2017 16:34:34 +0000 (18:34 +0200)
committerWilly Tarreau <w@1wt.eu>
Tue, 31 Oct 2017 17:03:24 +0000 (18:03 +0100)
commit96060bad266b9b402d3ea79ec84419f3e0c4fed4
tree6b12a8ad869383f95f0056918f669728ae7917aa
parent183126488b7b749ab60f5e4963fc854f5f680981
MINOR: h2: handle two extra stream states for errors

We need to deal with stream error notifications (RST_STREAM) as well as
internal reporting. The problem is that we don't know in which order
this will be done so we can't unilaterally decide to deallocate the
stream. In order to help, we add two extra stream states, H2_SS_ERROR
and H2_SS_RESET. The former mentions that the stream has an error pending
and the latter indicates that the error was already sent and that the
stream is now closed. It's equivalent to H2_SS_CLOSED except that in this
state we'll avoid sending new RST_STREAM as per RFC7540#5.4.2.

With this it will be possible to only detach or deallocate the h2s once
the stream is closed.
src/mux_h2.c