- Major version jump from v2.0 to v2.1 - Update haproxy download URL and hash - Add new patches (see https://www.haproxy.org/bugs/bugs-2.1.2.html) - Stop building LUA 5.3 in the haproxy build-process and use liblua5.3 as a dependency instead Signed-off-by: Christian Lachner <gladiac@gmail.com>
37 lines
1.6 KiB
Diff
37 lines
1.6 KiB
Diff
commit 48cd95b6a516562af382930adcc0eabfdb652487
|
|
Author: Christopher Faulet <cfaulet@haproxy.com>
|
|
Date: Thu Jan 9 14:31:13 2020 +0100
|
|
|
|
BUG/MINOR: stream-int: Don't trigger L7 retry if max retries is already reached
|
|
|
|
When an HTTP response is received, at the stream-interface level, if a L7 retry
|
|
must be triggered because of the status code, the response is trashed and a read
|
|
error is reported on the response channel. Then the stream handles this error
|
|
and perform the retry. Except if the maximum connection retries is reached. In
|
|
this case, an error is reported. Because the server response was already trashed
|
|
by the stream-interface, a generic 502 error is returned to the client instead
|
|
of the server's one.
|
|
|
|
Now, the stream-interface triggers a L7 retry only if the maximum connection
|
|
retries is not already reached. Thus, at the end, the last server's response is
|
|
returned.
|
|
|
|
This patch must be backported to 2.1 and 2.0. It should fix the issue #439.
|
|
|
|
(cherry picked from commit 48726b78e57a69bfcdce624a3a5905c781d5eec0)
|
|
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
|
|
|
|
diff --git a/src/stream_interface.c b/src/stream_interface.c
|
|
index 1d84ca9ad..012ac71e0 100644
|
|
--- a/src/stream_interface.c
|
|
+++ b/src/stream_interface.c
|
|
@@ -1372,7 +1372,8 @@ int si_cs_recv(struct conn_stream *cs)
|
|
break;
|
|
}
|
|
|
|
- if (si->flags & SI_FL_L7_RETRY) {
|
|
+ /* L7 retries enabled and maximum connection retries not reached */
|
|
+ if ((si->flags & SI_FL_L7_RETRY) && si->conn_retries) {
|
|
struct htx *htx;
|
|
struct htx_sl *sl;
|
|
|