[MINOR] cfgparse: only keep one of dispatch, transparent, http_proxy

Since all of them are defined as proxy options, it's better to ensure
that at most one of them is enabled at once. The priority has been set
according to what is already performed in the backend :

   1) dispatch
   2) http_proxy
   3) transparent
This commit is contained in:
Willy Tarreau 2011-03-04 17:30:54 +01:00
parent f5ab69aad9
commit d6cc532ca1

View File

@ -5636,6 +5636,19 @@ int check_config_validity()
}
}
if (curproxy->options2 & PR_O2_DISPATCH) {
curproxy->options &= ~PR_O_TRANSP;
curproxy->options &= ~PR_O_HTTP_PROXY;
}
else if (curproxy->options & PR_O_HTTP_PROXY) {
curproxy->options2 &= ~PR_O2_DISPATCH;
curproxy->options &= ~PR_O_TRANSP;
}
else if (curproxy->options & PR_O_TRANSP) {
curproxy->options2 &= ~PR_O2_DISPATCH;
curproxy->options &= ~PR_O_HTTP_PROXY;
}
if ((curproxy->options & PR_O_DISABLE404) && !(curproxy->options & PR_O_HTTP_CHK)) {
curproxy->options &= ~PR_O_DISABLE404;
Warning("config : '%s' will be ignored for %s '%s' (requires 'option httpchk').\n",