]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MEDIUM: http: don't enable auto-close on the response side
authorWilly Tarreau <w@1wt.eu>
Wed, 25 Nov 2015 19:11:11 +0000 (20:11 +0100)
committerWilly Tarreau <w@1wt.eu>
Thu, 26 Nov 2015 09:25:11 +0000 (10:25 +0100)
commit714ea78c9a09fe6a35a1f2d86af8f7fc9abb64d1
treecf0c3fda4e718f9bb848a0cc743990ac6d59b034
parent9579d12f2ee88a00dc418730e315edfc2a8b536d
BUG/MEDIUM: http: don't enable auto-close on the response side

There is a bug where "option http-keep-alive" doesn't force a response
to stay in keep-alive if the server sends the FIN along with the response
on the second or subsequent response. The reason is that the auto-close
was forced enabled when recycling the HTTP transaction and it's never
disabled along the response processing chain before the SHUTR gets a
chance to be forwarded to the client side. The MSG_DONE state of the
HTTP response properly disables it but too late.

There's no more reason for enabling auto-close here, because either it
doesn't matter in non-keep-alive modes because the connection is closed,
or it is automatically enabled by process_stream() when it sees there's
no analyser on the stream.

This bug also affects 1.5 so a backport is desired.
src/proto_http.c