BUG/MINOR: http-ana: Don't increment HTTP error counter on read error/timeout
authorChristopher Faulet <cfaulet@haproxy.com>
Wed, 3 Mar 2021 10:24:10 +0000 (11:24 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Wed, 3 Mar 2021 15:35:02 +0000 (16:35 +0100)
This should have been fixed when the commit "BUG/MINOR: http-ana: Don't
increment HTTP error counter on internal errors" was backported but I forgot
to do so. The HTTP error counter must not be incremented if a read error or
a read timeout is encountered. Parsing error are already reported by the
mux.

This patch must be backported as far as 2.0, on the HTX part only.

(cherry picked from commit 054fd32ba661887888b9667353f2c42164141f23)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
(cherry picked from commit 0e8e760818d061891c09c7e6ad1524f192232e1c)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>

src/http_ana.c

index 304bf47..7ab8470 100644 (file)
@@ -146,7 +146,6 @@ int http_wait_for_request(struct stream *s, struct channel *req, int an_bit)
                        if (sess->fe->options & PR_O_IGNORE_PRB)
                                goto failed_keep_alive;
 
-                       stream_inc_http_err_ctr(s);
                        stream_inc_http_req_ctr(s);
                        proxy_inc_fe_req_ctr(sess->fe);
                        _HA_ATOMIC_ADD(&sess->fe->fe_counters.failed_req, 1);
@@ -173,7 +172,6 @@ int http_wait_for_request(struct stream *s, struct channel *req, int an_bit)
                        if (sess->fe->options & PR_O_IGNORE_PRB)
                                goto failed_keep_alive;
 
-                       stream_inc_http_err_ctr(s);
                        stream_inc_http_req_ctr(s);
                        proxy_inc_fe_req_ctr(sess->fe);
                        _HA_ATOMIC_ADD(&sess->fe->fe_counters.failed_req, 1);