From f4b707478489c64e696b5178a336d11b60f07122 Mon Sep 17 00:00:00 2001 From: Christopher Faulet Date: Wed, 10 Feb 2021 14:48:57 +0100 Subject: [PATCH] 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. --- src/mux_h1.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/mux_h1.c b/src/mux_h1.c index 01343c36c..8f96cdf91 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);