]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG: http: do not abort keep-alive connections on server timeout
authorlsenta <laurent.senta@gmail.com>
Fri, 13 Nov 2015 09:44:22 +0000 (10:44 +0100)
committerWilly Tarreau <w@1wt.eu>
Fri, 13 Nov 2015 13:41:51 +0000 (14:41 +0100)
When a server timeout is detected on the second or nth request of a keep-alive
connection, HAProxy closes the connection without writing a response.
Some clients would fail with a remote disconnected exception and some
others would retry potentially unsafe requests.

This patch removes the special case and makes sure a 504 timeout is
written back whenever a server timeout is handled.

Signed-off-by: lsenta <laurent.senta@gmail.com>
src/proto_http.c

index 2dcac06745f102c1605ee566c6b00ae3ab2007b0..d33b4a144c0b1c67211fa813df91c2713da196f4 100644 (file)
@@ -6125,8 +6125,6 @@ int http_wait_for_response(struct stream *s, struct channel *rep, int an_bit)
                else if (rep->flags & CF_READ_TIMEOUT) {
                        if (msg->err_pos >= 0)
                                http_capture_bad_message(&s->be->invalid_rep, s, msg, msg->msg_state, sess->fe);
-                       else if (txn->flags & TX_NOT_FIRST)
-                               goto abort_keep_alive;
 
                        s->be->be_counters.failed_resp++;
                        if (objt_server(s->target)) {