]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MINOR: stream-int: Don't trigger L7 retry if max retries is already reached
authorChristopher Faulet <cfaulet@haproxy.com>
Thu, 9 Jan 2020 13:31:13 +0000 (14:31 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Thu, 9 Jan 2020 14:39:06 +0000 (15:39 +0100)
commit48726b78e57a69bfcdce624a3a5905c781d5eec0
tree362e390a26faaec5c02c9a9ca4e29074804ee2a5
parent3e34ac7d09c33f62c52bc7ca0df18310b1afcff4
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.
src/stream_interface.c