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:
Willy Tarreau 2012-12-14 08:33:14 +01:00
parent 39ebef82aa
commit f26b252ee4

View File

@ -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;