]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
[BUG] http: stats were not incremented on http-request deny
authorWilly Tarreau <w@1wt.eu>
Thu, 6 Jan 2011 17:19:50 +0000 (18:19 +0100)
committerWilly Tarreau <w@1wt.eu>
Sun, 13 Mar 2011 21:00:24 +0000 (22:00 +0100)
A counter increase was missing here.
This should be backported to 1.4 with care, as the code has changed a bit.

src/proto_http.c

index 156fd4b74975b56617e0886b5f2e985978495355..30177eeeefafaf8c5fff0877183369119f557896 100644 (file)
@@ -3084,6 +3084,11 @@ int http_process_req_common(struct session *s, struct buffer *req, int an_bit, s
                        s->logs.tv_request = now;
                        stream_int_retnclose(req->prod, error_message(s, HTTP_ERR_403));
                        session_inc_http_err_ctr(s);
+                       s->fe->fe_counters.denied_req++;
+                       if (an_bit == AN_REQ_HTTP_PROCESS_BE)
+                               s->be->be_counters.denied_req++;
+                       if (s->listener->counters)
+                               s->listener->counters->denied_req++;
                        goto return_prx_cond;
        }