]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: config: Add warning for http-after-response rules in TCP mode
authorChristopher Faulet <cfaulet@haproxy.com>
Mon, 15 Mar 2021 14:09:21 +0000 (15:09 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Thu, 1 Apr 2021 09:06:47 +0000 (11:06 +0200)
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.

src/cfgparse.c

index 2a0e98bcf3ed6ba169c2d1ce68f069584ef1960c..0cffdbbf4a82b19204bfab179e6dfec2ce6b7d0e 100644 (file)
@@ -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);