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 10:24:11 +0000 (11:24 +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.

src/http_ana.c

index f913887..f9dbfb1 100644 (file)
@@ -148,7 +148,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->listener, sess->fe);
                        _HA_ATOMIC_ADD(&sess->fe->fe_counters.failed_req, 1);
@@ -175,7 +174,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->listener, sess->fe);
                        _HA_ATOMIC_ADD(&sess->fe->fe_counters.failed_req, 1);