From: Christopher Faulet Date: Wed, 10 Feb 2021 13:48:57 +0000 (+0100) Subject: BUG/MINOR: mux-h1: Don't increment HTTP error counter for 408/500/501 errors X-Git-Tag: v2.4-dev8~91 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f4b707478489c64e696b5178a336d11b60f07122;p=thirdparty%2Fhaproxy.git BUG/MINOR: mux-h1: Don't increment HTTP error counter for 408/500/501 errors The HTTP error counter reflects the number of errors caused by clients. Thus, In the H1 mux, it should only be increment on parsing errors. This fix is specific for 2.4. No backport needed. --- diff --git a/src/mux_h1.c b/src/mux_h1.c index 01343c36ca..8f96cdf91c 100644 --- a/src/mux_h1.c +++ b/src/mux_h1.c @@ -2394,7 +2394,6 @@ static int h1_handle_internal_err(struct h1c *h1c) int ret = 1; session_inc_http_req_ctr(sess); - session_inc_http_err_ctr(sess); proxy_inc_fe_req_ctr(sess->listener, sess->fe); _HA_ATOMIC_ADD(&sess->fe->fe_counters.p.http.rsp[5], 1); _HA_ATOMIC_ADD(&sess->fe->fe_counters.internal_errors, 1); @@ -2447,7 +2446,6 @@ static int h1_handle_not_impl_err(struct h1c *h1c) goto end; session_inc_http_req_ctr(sess); - session_inc_http_err_ctr(sess); proxy_inc_fe_req_ctr(sess->listener, sess->fe); _HA_ATOMIC_ADD(&sess->fe->fe_counters.p.http.rsp[4], 1); _HA_ATOMIC_ADD(&sess->fe->fe_counters.failed_req, 1); @@ -2474,7 +2472,6 @@ static int h1_handle_req_tout(struct h1c *h1c) goto end; session_inc_http_req_ctr(sess); - session_inc_http_err_ctr(sess); proxy_inc_fe_req_ctr(sess->listener, sess->fe); _HA_ATOMIC_ADD(&sess->fe->fe_counters.p.http.rsp[4], 1); _HA_ATOMIC_ADD(&sess->fe->fe_counters.failed_req, 1);