From: Willy Tarreau Date: Thu, 4 Mar 2010 22:02:38 +0000 (+0100) Subject: [STATS] frontend requests were not accounted for failed requests X-Git-Tag: v1.4.1~4 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3e1b6d1ed062f9e615c8eb174c6245653ae15ea9;p=thirdparty%2Fhaproxy.git [STATS] frontend requests were not accounted for failed requests But failed requests were accounted for, resulting in more failures than requests. --- diff --git a/src/proto_http.c b/src/proto_http.c index 3db8ac4a78..0131700e3b 100644 --- a/src/proto_http.c +++ b/src/proto_http.c @@ -2429,8 +2429,10 @@ int http_wait_for_request(struct session *s, struct buffer *req, int an_bit) /* * First, let's catch bad requests. */ - if (unlikely(msg->msg_state == HTTP_MSG_ERROR)) + if (unlikely(msg->msg_state == HTTP_MSG_ERROR)) { + proxy_inc_fe_req_ctr(s->fe); goto return_bad_req; + } /* 1: Since we are in header mode, if there's no space * left for headers, we won't be able to free more @@ -2441,6 +2443,7 @@ int http_wait_for_request(struct session *s, struct buffer *req, int an_bit) /* FIXME: check if URI is set and return Status * 414 Request URI too long instead. */ + proxy_inc_fe_req_ctr(s->fe); goto return_bad_req; } @@ -2458,6 +2461,7 @@ int http_wait_for_request(struct session *s, struct buffer *req, int an_bit) msg->msg_state = HTTP_MSG_ERROR; req->analysers = 0; + proxy_inc_fe_req_ctr(s->fe); s->fe->counters.failed_req++; if (s->listener->counters) s->listener->counters->failed_req++; @@ -2483,6 +2487,7 @@ int http_wait_for_request(struct session *s, struct buffer *req, int an_bit) msg->msg_state = HTTP_MSG_ERROR; req->analysers = 0; + proxy_inc_fe_req_ctr(s->fe); s->fe->counters.failed_req++; if (s->listener->counters) s->listener->counters->failed_req++; @@ -2507,6 +2512,7 @@ int http_wait_for_request(struct session *s, struct buffer *req, int an_bit) msg->msg_state = HTTP_MSG_ERROR; req->analysers = 0; + proxy_inc_fe_req_ctr(s->fe); s->fe->counters.failed_req++; if (s->listener->counters) s->listener->counters->failed_req++;