MEDIUM: proxy: remove acl_requires and just keep a flag "http_needed"
Proxy's acl_requires was a copy of all bits taken from ACLs, but we'll
get rid of ACL flags and only rely on sample fetches soon. The proxy's
acl_requires was only used to allocate an HTTP context when needed, and
was even forced in HTTP mode. So better have a flag which exactly says
what it's supposed to be used for.
diff --git a/src/proxy.c b/src/proxy.c
index 9ccd25a..1986a7c 100644
--- a/src/proxy.c
+++ b/src/proxy.c
@@ -828,7 +828,7 @@
/* If the target backend requires HTTP processing, we have to allocate
* a struct hdr_idx for it if we did not have one.
*/
- if (unlikely(!s->txn.hdr_idx.v && (be->acl_requires & ACL_USE_L7_ANY))) {
+ if (unlikely(!s->txn.hdr_idx.v && be->http_needed)) {
if ((s->txn.hdr_idx.v = pool_alloc2(pool2_hdr_idx)) == NULL)
return 0; /* not enough memory */