]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MINOR: stream-int: don't set MSG_MORE on SHUTW_NOW without AUTO_CLOSE
authorWilly Tarreau <w@1wt.eu>
Tue, 17 Oct 2017 14:33:46 +0000 (16:33 +0200)
committerWilly Tarreau <w@1wt.eu>
Tue, 17 Oct 2017 14:38:21 +0000 (16:38 +0200)
commit4ac49287182dfefc69e7088332348ea0948022fa
treec11ffcdfb804384b521754a159424cdbf5cd5761
parent953917abc9fb72c49fa49cb41bc2cdbecd7c9e93
BUG/MINOR: stream-int: don't set MSG_MORE on SHUTW_NOW without AUTO_CLOSE

Since around 1.5-dev12, we've been setting MSG_MORE on send() on various
conditions, including the fact that SHUTW_NOW is present, but we don't
check that it's accompanied with AUTO_CLOSE. The result is that on requests
immediately followed by a close (where AUTO_CLOSE is not set), the request
gets delayed in the TCP stack before being sent to the server. This is
visible with the H2 code where the end-of-stream flag is set on requests,
but probably happens when a POLL_HUP is detected along with the request.
The (lack of) presence of option abortonclose has no effect here since we
never send the SHUTW along with the request.

This fix can be backported to 1.7, 1.6 and 1.5.
src/stream_interface.c