]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
CLEANUP: http-ana: Remove useless if statement about L7 retries
authorChristopher Faulet <cfaulet@haproxy.com>
Mon, 31 May 2021 09:45:24 +0000 (11:45 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Mon, 31 May 2021 09:45:26 +0000 (11:45 +0200)
Thanks to the commit 1f08bffe0 ("MINOR: http-ana: Perform L7 retries because
of status codes in response analyser"), the L7 retries about the response
status code is now fully handled in the HTTP response analyser.
CF_READ_ERROR flag is no longer set on the response channel in this
case. Thus it is useless to try to catch L7 retries when CF_READ_ERROR is
set because it cannot happen.

The above commit was backported to 2.4, thus this one should also be
backported.

src/http_ana.c

index a045e53fe04fa322cdd9299dd2b963f2e29a9c1e..0a1af6d887a9d7aa31a7abbc7d3be7098086fc6a 100644 (file)
@@ -1368,18 +1368,6 @@ int http_wait_for_response(struct stream *s, struct channel *rep, int an_bit)
                        if (objt_cs(s->si[1].end))
                                conn = objt_cs(s->si[1].end)->conn;
 
-                       if (si_b->flags & SI_FL_L7_RETRY &&
-                           (!conn || conn->err_code != CO_ER_SSL_EARLY_FAILED)) {
-                               /* If we arrive here, then CF_READ_ERROR was
-                                * set by si_cs_recv() because we matched a
-                                * status, otherwise it would have removed
-                                * the SI_FL_L7_RETRY flag, so it's ok not
-                                * to check s->be->retry_type.
-                                */
-                               if (co_data(rep) || do_l7_retry(s, si_b) == 0)
-                                       return 0;
-                       }
-
                        /* Perform a L7 retry because server refuses the early data. */
                        if ((si_b->flags & SI_FL_L7_RETRY) &&
                            (s->be->retry_type & PR_RE_EARLY_ERROR) &&