]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MEDIUM: stream: don't consider abortonclose on muxes which close cleanly
authorWilly Tarreau <w@1wt.eu>
Wed, 20 Dec 2017 15:56:50 +0000 (16:56 +0100)
committerWilly Tarreau <w@1wt.eu>
Wed, 20 Dec 2017 16:01:24 +0000 (17:01 +0100)
commit7aa15b072ea752399144c8193a85c55e26893591
treea98636d6605c8066b5340e971b1966b8cb76f09e
parent984fca936305d7552d92559436f3d5dbe4d917a0
BUG/MEDIUM: stream: don't consider abortonclose on muxes which close cleanly

The H2 mux can cleanly report an error when a client closes, which is not
the case for the pass-through mux which only reports shutr. That was the
reason why "option abortonclose" was created since there was no way to
distinguish a clean shutdown after sending the request from an abort.

The problem is that in case of H2, the streams are always shut read after
the request is complete (when the END_STREAM flag is received), and that
when this lands on a backend configured with "option abortonclose", this
aborts the request. Disabling abortonclose is not always an option when
H1 and H2 have to coexist.

This patch makes use of the newly introduced mux capabilities reported
via the stream interface's SI_FL_CLEAN_ABRT indicating that the mux is
safe and that there is no need to turn a clean shutread into an abort.
This way abortonclose has no effect on requests initiated from an H2
mux.

This patch as well as these 3 previous ones need to be backported to
1.8 :
 - BUG/MINOR: h2: properly report a stream error on RST_STREAM
 - MINOR: mux: add flags to describe a mux's capabilities
 - MINOR: stream-int: set flag SI_FL_CLEAN_ABRT when mux supports clean aborts
src/proto_http.c
src/stream.c