]> git.ipfire.org Git - thirdparty/haproxy.git/commit
[MINOR] prevent the system from sending an RST when closing health-checks
authorKrzysztof Oledzki <ole@ans.pl>
Thu, 11 Oct 2007 16:41:08 +0000 (18:41 +0200)
committerWilly Tarreau <w@1wt.eu>
Mon, 15 Oct 2007 07:32:58 +0000 (09:32 +0200)
commit6b3f8b4b8f40441a39fca196ccb1052d4cba27e0
treedb25b1df1e378500a84498a80e7674921ea665b4
parent56f1e8b368d08a08ed09cef2dd6371000ebfe51c
[MINOR] prevent the system from sending an RST when closing health-checks

On Sat, 22 Sep 2007, Willy Tarreau wrote:
> On Sun, Sep 23, 2007 at 03:23:38AM +0200, Krzysztof Oledzki wrote:
> > I noticed that with httpchk, haproxy generates TCP RST at end of a check.
> > IMHO, it would be more polite to send FIN to a server, especially that
> > each TCP RST found by a tcpdump makes me concerned that something is
> > wrong, as it is hard to distinguish between a RST from a httpchk and from
> > a normal request, forwarded for a client.
>
> I have also noticed it very recently. In fact, it's never the
> application (here haproxy) which decides to send an RST, it's the
> system. It does so because the server returns data on a terminated
> socket. I guess it's because the health-check code does not read much
> of the response. In fact, we just need to read enough to process common
> responses. If people are dumb enough to check with something like "GET
> /image.iso", they should expect to get an RST after a few kbytes
> instead of reading the whole file!

Right, that was easy. Attached patch changed what you described. Now
haproxy finishes http checks with FIN.
src/checks.c