You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

37 lines
1.4 KiB

  1. From ef8a113d59e89b2214adf7ab9f9b0b75905a7050 Mon Sep 17 00:00:00 2001
  2. From: lsenta <laurent.senta@gmail.com>
  3. Date: Fri, 13 Nov 2015 10:44:22 +0100
  4. Subject: [PATCH 03/10] BUG: http: do not abort keep-alive connections on
  5. server timeout
  6. When a server timeout is detected on the second or nth request of a keep-alive
  7. connection, HAProxy closes the connection without writing a response.
  8. Some clients would fail with a remote disconnected exception and some
  9. others would retry potentially unsafe requests.
  10. This patch removes the special case and makes sure a 504 timeout is
  11. written back whenever a server timeout is handled.
  12. Signed-off-by: lsenta <laurent.senta@gmail.com>
  13. (cherry picked from commit 1e1f41d0f3473d86da84dc3785b7d7cbef6e9044)
  14. (cherry picked from commit 1f279c0b116f7fbc208793fffbd256c3c736fc52)
  15. ---
  16. src/proto_http.c | 2 --
  17. 1 file changed, 2 deletions(-)
  18. diff --git a/src/proto_http.c b/src/proto_http.c
  19. index 17742c6..e7e1785 100644
  20. --- a/src/proto_http.c
  21. +++ b/src/proto_http.c
  22. @@ -5782,8 +5782,6 @@ int http_wait_for_response(struct session *s, struct channel *rep, int an_bit)
  23. else if (rep->flags & CF_READ_TIMEOUT) {
  24. if (msg->err_pos >= 0)
  25. http_capture_bad_message(&s->be->invalid_rep, s, msg, msg->msg_state, s->fe);
  26. - else if (txn->flags & TX_NOT_FIRST)
  27. - goto abort_keep_alive;
  28. s->be->be_counters.failed_resp++;
  29. if (objt_server(s->target)) {
  30. --
  31. 2.4.10