mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-24 15:21:29 +02:00
MINOR: config: tolerate server "cookie" setting in non-HTTP mode
Up to now, if a cookie value was specified on a server when the proxy was in TCP mode, it would cause a fatal error. Now we only report a warning, since the cookie will be ignored. This makes it easier to generate configs from scripts.
This commit is contained in:
parent
2e99390faf
commit
0cec331a0e
@ -6145,12 +6145,18 @@ out_uri_auth_compat:
|
||||
*/
|
||||
newsrv = curproxy->srv;
|
||||
while (newsrv != NULL) {
|
||||
if ((curproxy->mode != PR_MODE_HTTP) && (newsrv->rdr_len || newsrv->cklen)) {
|
||||
if ((curproxy->mode != PR_MODE_HTTP) && newsrv->rdr_len) {
|
||||
Alert("config : %s '%s' : server cannot have cookie or redirect prefix in non-HTTP mode.\n",
|
||||
proxy_type_str(curproxy), curproxy->id);
|
||||
cfgerr++;
|
||||
}
|
||||
|
||||
if ((curproxy->mode != PR_MODE_HTTP) && newsrv->cklen) {
|
||||
Warning("config : %s '%s' : ignoring cookie for server '%s' as HTTP mode is disabled.\n",
|
||||
proxy_type_str(curproxy), curproxy->id, newsrv->id);
|
||||
err_code |= ERR_WARN;
|
||||
}
|
||||
|
||||
#if defined(CONFIG_HAP_CTTPROXY) || defined(CONFIG_HAP_LINUX_TPROXY)
|
||||
if (curproxy->mode != PR_MODE_HTTP && newsrv->bind_hdr_occ) {
|
||||
newsrv->bind_hdr_occ = 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user