mirror of
https://github.com/haproxy/haproxy.git
synced 2026-06-07 15:52:10 -04:00
MINOR: http: make resp_ver and status ACLs check for the presence of a response
The two ACL fetches "resp_ver" and "status", if used in a request despite the warning, would return a match of zero length. This is inappropriate, better return a non-match to be more consistent with other ACL processing.
This commit is contained in:
parent
39ebef82aa
commit
f26b252ee4
1 changed files with 6 additions and 0 deletions
|
|
@ -8187,6 +8187,9 @@ acl_fetch_stver(struct proxy *px, struct session *l4, void *l7, unsigned int opt
|
|||
|
||||
CHECK_HTTP_MESSAGE_FIRST();
|
||||
|
||||
if (txn->rsp.msg_state < HTTP_MSG_BODY)
|
||||
return 0;
|
||||
|
||||
len = txn->rsp.sl.st.v_l;
|
||||
ptr = txn->rsp.chn->buf->p;
|
||||
|
||||
|
|
@ -8213,6 +8216,9 @@ acl_fetch_stcode(struct proxy *px, struct session *l4, void *l7, unsigned int op
|
|||
|
||||
CHECK_HTTP_MESSAGE_FIRST();
|
||||
|
||||
if (txn->rsp.msg_state < HTTP_MSG_BODY)
|
||||
return 0;
|
||||
|
||||
len = txn->rsp.sl.st.c_l;
|
||||
ptr = txn->rsp.chn->buf->p + txn->rsp.sl.st.c;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue