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.
This commit is contained in:
Christopher Faulet 2021-02-10 14:48:57 +01:00
parent 7b41654495
commit f4b7074784

View File

@ -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);