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/cfgparse.c b/src/cfgparse.c
index 6b27c24..e277b12 100644
--- a/src/cfgparse.c
+++ b/src/cfgparse.c
@@ -3040,8 +3040,7 @@
}
/* check if we need to allocate an hdr_idx struct for HTTP parsing */
- if (expr->fetch->use & SMP_USE_HTTP_ANY)
- curproxy->acl_requires |= ACL_USE_L7_ANY;
+ curproxy->http_needed |= !!(expr->fetch->use & SMP_USE_HTTP_ANY);
if (strcmp(args[myidx], "table") == 0) {
myidx++;
@@ -6044,7 +6043,7 @@
break;
case PR_MODE_HTTP:
- curproxy->acl_requires |= ACL_USE_L7_ANY;
+ curproxy->http_needed = 1;
break;
}