]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MEDIUM: stream: Fix the way early aborts on the client side are handled
authorChristopher Faulet <cfaulet@haproxy.com>
Tue, 23 Apr 2019 15:34:22 +0000 (17:34 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Tue, 23 Apr 2019 19:20:47 +0000 (21:20 +0200)
commit5e1a9d715ee634a218269d2df10fbfbee4e4c3d2
treef4c31dd076a5e5401188809fef60558488426432
parentbed883abe8b9590219f215ef9389b0d51cdc0d5e
BUG/MEDIUM: stream: Fix the way early aborts on the client side are handled

A regression was introduced with the commit c9aecc8ff ("BUG/MEDIUM: stream:
Don't request a server connection if a shutw was scheduled"). Among other this,
it breaks the CLI when the shutr on the client side is handled with the client
data. To depend on the flag CF_SHUTW_NOW to not establish the server connection
when an error on the client side is detected is the right way to fix the bug,
because this flag may be set without any error on the client side.

So instead, we abort the request where the error is handled and only when the
backend stream-interface is in the state SI_ST_INI. This way, there is no
ambiguity on the reason why the abort accurred. The stream-interface is also
switched to the state SI_ST_CLO.

This patch must be backported to 1.9. If the commit c9aecc8ff is backported to
previous versions, this one MUST also be backported. Otherwise, it MAY be
backported to older versions that 1.9 with caution.
src/stream.c