]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MINOR: http-ana: Send the right error if max retries is reached on L7 retry
authorChristopher Faulet <cfaulet@haproxy.com>
Wed, 26 May 2021 08:31:06 +0000 (10:31 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Wed, 26 May 2021 08:31:11 +0000 (10:31 +0200)
commit552601d5fd924f609dfc397baae8f5d96104d89d
treedd06ab34b8505862662b894288942e5da85072e8
parent9f5382e45296da91d5c7f015469f0e743df1ffd0
BUG/MINOR: http-ana: Send the right error if max retries is reached on L7 retry

This bug was introduced by the previous commit (9f5382e45 Revert "MEDIUM:
http-ana: Deal with L7 retries in HTTP analysers") because I failed the
revert.

On L7 retry, if the maximum connection retries is reached, an error must be
return to the client. Depending the situation, it may be a 502-Bad-Gateway
(empty-response or junk-response), a 504-Gateway-Timeout (response-timeout)
or a 425-Too-Early (0rtt-rejected). But contrary to what the comment says,
the do_l7_retry() function always returns a success.

Note it is not a problem for L7 retries on the response status code because
the stream-interface already takes care to have not reached the maximum
connection retries counter to trigger a L7 retry.

This patch must be backported to 2.4 because the commit must also be
backported to 2.4.
src/http_ana.c