From: Christopher Faulet Date: Mon, 15 Mar 2021 14:09:21 +0000 (+0100) Subject: BUG/MINOR: config: Add warning for http-after-response rules in TCP mode X-Git-Tag: v2.4-dev15~57 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=bb7abede93f35ce7ab371ab55e4b9e2f497c53f2;p=thirdparty%2Fhaproxy.git BUG/MINOR: config: Add warning for http-after-response rules in TCP mode No warning is emitted if some http-after-response rules are configured on a TCP proxy while such warning messages are emitted for other HTTP ruleset in same condition. It is just an oversight. This patch may be backported as far as 2.2. --- diff --git a/src/cfgparse.c b/src/cfgparse.c index 2a0e98bcf3..0cffdbbf4a 100644 --- a/src/cfgparse.c +++ b/src/cfgparse.c @@ -3083,6 +3083,12 @@ out_uri_auth_compat: err_code |= ERR_WARN; } + if (!LIST_ISEMPTY(&curproxy->http_after_res_rules)) { + ha_warning("config : 'http-after-response' rules ignored for %s '%s' as they require HTTP mode.\n", + proxy_type_str(curproxy), curproxy->id); + err_code |= ERR_WARN; + } + if (!LIST_ISEMPTY(&curproxy->redirect_rules)) { ha_warning("config : 'redirect' rules ignored for %s '%s' as they require HTTP mode.\n", proxy_type_str(curproxy), curproxy->id);