From: Christopher Faulet Date: Wed, 10 Feb 2021 13:58:01 +0000 (+0100) Subject: BUG/MINOR: http-ana: Don't increment HTTP error counter on internal errors X-Git-Tag: v2.1.12~52 X-Git-Url: http://git.haproxy.org/?a=commitdiff_plain;h=82282eb2452e8363b3b53cf2f69332a274be89c4;p=haproxy-2.1.git BUG/MINOR: http-ana: Don't increment HTTP error counter on internal errors If internal error is reported by the mux during HTTP request parsing, the HTTP error counter should not be incremented. It should only be incremented on parsing error to reflect errors caused by clients. This patch must be backported as far as 2.0. During the backport, the same must be performed for 408-request-time-out errors. (cherry picked from commit bf7175f9b6480fa25e859e226a1f460744e163cd) Signed-off-by: Christopher Faulet (cherry picked from commit e01e583b1677d1f9d1859817e33b6c9c00fa4229) Signed-off-by: Christopher Faulet (cherry picked from commit fb7b410c1f0b46d875ba18cf7676460586b233d2) Signed-off-by: Christopher Faulet --- diff --git a/src/http_ana.c b/src/http_ana.c index a6fd65f..65a5ddf 100644 --- a/src/http_ana.c +++ b/src/http_ana.c @@ -95,10 +95,11 @@ int http_wait_for_request(struct stream *s, struct channel *req, int an_bit) /* Parsing errors are caught here */ if (htx->flags & (HTX_FL_PARSING_ERROR|HTX_FL_PROCESSING_ERROR)) { stream_inc_http_req_ctr(s); - stream_inc_http_err_ctr(s); proxy_inc_fe_req_ctr(sess->fe); - if (htx->flags & HTX_FL_PARSING_ERROR) + if (htx->flags & HTX_FL_PARSING_ERROR) { + stream_inc_http_err_ctr(s); goto return_bad_req; + } else goto return_int_err; }