mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-01-25 15:03:03 +00: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
@ -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 New Issue
Block a user