Re: httpclose/forceclose and TCP states

From: Willy Tarreau <w#1wt.eu>
Date: Thu, 8 Sep 2011 08:06:18 +0200


On Thu, Sep 01, 2011 at 09:04:41PM -0400, Chris Burroughs wrote:
> I'm trying to figure out what exactly the httpclose/forceclose is doing
> when it forces "the closing of the outgoing server channel as soon as
> the server begins to reply and only if the request buffer is empty". Is
> it sending a RST?

No, otherwise it would abort the server's response. It's doing a shutdown(SHUT_WR), which results in a FIN on the wire. Anyway, as of 1.4 we don't do that anymore since we're aware of the end of response. So we close the connection as soon as we get the whole response from the server and here yes, we close with an RST (at least we try to do so, since we don't control this).

> I've looked at the source code and I think that's what's going on, but
> it has been a while since I've read C networking code.

It depends what version you're reading :-)

Regards,
Willy Received on 2011/09/08 08:06

This archive was generated by hypermail 2.2.0 : 2011/09/08 08:15 CEST