mirror of
https://github.com/haproxy/haproxy.git
synced 2026-06-06 15:22:25 -04:00
[BUG] config: disable 'option httplog' on TCP proxies
Gabriel Sosa reported that logs were appearing with BADREQ when
'option httplog' was used with a TCP proxy (eg: inherited via a
default instance). This patch detects it and falls back to tcplog
after emitting a warning.
(cherry picked from commit 5f0bd6537f)
This commit is contained in:
parent
7bb651ec1d
commit
1780416e33
1 changed files with 5 additions and 0 deletions
|
|
@ -391,6 +391,11 @@ int proxy_cfg_ensure_no_http(struct proxy *curproxy)
|
|||
Warning("config : Layer 7 hash not possible for %s '%s' (needs 'mode http'). Falling back to round robin.\n",
|
||||
proxy_type_str(curproxy), curproxy->id);
|
||||
}
|
||||
if (curproxy->to_log & (LW_REQ | LW_RESP)) {
|
||||
curproxy->to_log &= ~(LW_REQ | LW_RESP);
|
||||
Warning("config : 'option httplog' not usable with %s '%s' (needs 'mode http'). Falling back to 'option tcplog'.\n",
|
||||
proxy_type_str(curproxy), curproxy->id);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue