mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2026-05-04 12:41:00 +02:00
BUG/MINOR: http: block rules forgot to increment the session's request counter
The session's backend request counters were incremented after the block
rules while these rules could increment the session's error counters,
meaning that we could have more errors than requests reported in a stick
table! Commit 5d5b5d8 ("MEDIUM: proto_tcp: add support for tracking L7
information") is the most responsible for this.
This bug is 1.5-specific and does not need any backport.
This commit is contained in:
parent
5fa7082911
commit
65410831a1
@ -3769,6 +3769,9 @@ int http_process_req_common(struct session *s, struct channel *req, int an_bit,
|
||||
req->buf->i,
|
||||
req->analysers);
|
||||
|
||||
/* just in case we have some per-backend tracking */
|
||||
session_inc_be_http_req_ctr(s);
|
||||
|
||||
/* first check whether we have some ACLs set to block this request */
|
||||
list_for_each_entry(cond, &px->block_cond, list) {
|
||||
int ret = acl_exec_cond(cond, px, s, txn, SMP_OPT_DIR_REQ|SMP_OPT_FINAL);
|
||||
@ -3781,9 +3784,6 @@ int http_process_req_common(struct session *s, struct channel *req, int an_bit,
|
||||
goto deny;
|
||||
}
|
||||
|
||||
/* just in case we have some per-backend tracking */
|
||||
session_inc_be_http_req_ctr(s);
|
||||
|
||||
/* evaluate http-request rules */
|
||||
http_req_last_rule = http_req_get_intercept_rule(px, &px->http_req_rules, s, txn);
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user