]> git.ipfire.org Git - thirdparty/haproxy.git/commit
[MEDIUM] session: better fix for connection to servers with closed input
authorWilly Tarreau <w@1wt.eu>
Sun, 21 Mar 2010 22:25:09 +0000 (23:25 +0100)
committerWilly Tarreau <w@1wt.eu>
Sun, 21 Mar 2010 22:31:42 +0000 (23:31 +0100)
commite45997661bfc7c915c3838c6dbb3a9f6602b1330
treefcaf0b5104e6ad9913545ca22a7391772979cba5
parent4e1554c295f4c572d829982bdcb7e2556ea23167
[MEDIUM] session: better fix for connection to servers with closed input

The following patch fixed an issue but brought another one :
  296897 [MEDIUM] connect to servers even when the input has already been closed

The new issue is that when a connection is inspected and aborted using
TCP inspect rules, now it is sent to the server before being closed. So
that test is not satisfying. A probably better way is not to prevent a
connection from establishing if only BF_SHUTW_NOW is set but BF_SHUTW
is not. That way, the BF_SHUTW flag is not set if the request has any
data pending, which still fixes the stats issue, but does not let any
empty connection pass through.

Also, as a safety measure, we extend buffer_abort() to automatically
disable the BF_AUTO_CONNECT flag. While it appears to always be OK,
it is by pure luck, so better safe than sorry.
include/proto/buffers.h
src/session.c