BUG/MINOR: http-ana: Do a L7 retry on read error if there is no response

A regression about "empty-response" L7 retry was introduced with the commit
dd6496f591 ("CLEANUP: http-ana: Remove useless if statement about L7
retries").

The if statetement was removed on a wrong assumption. Indeed, L7 retries on
status is now handled in the HTTP analysers. Thus, the stream-connector
(formely the conn-stream, and before again the stream-interface) no longer
report a read error to force a retry. But it is still possible to get a read
error with no response. In this case, we must perform a retry is
"empty-response" is enabled.

So the if statement is re-introduced, reverting the cleanup.

This patch should fix the issue #2061. It must be backported as far as 2.4.

(cherry picked from commit 6f78ac56059ac00265197c04b801a819dd730d8e)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
(cherry picked from commit d8dba50ac789abdc068c0232bf49cb9ad935a881)
Signed-off-by: Willy Tarreau <w@1wt.eu>
(cherry picked from commit bd65ed0214654fc9b489809a1372facca250e7f8)
[cf: Use the stream-interface instead of the SC on server side]
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
(cherry picked from commit 31243aae20936a859a0907f9902e02a8162079b6)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
1 file changed