]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: filters/htx: Forbid filters when the HTX is enabled on a proxy
authorChristopher Faulet <cfaulet@haproxy.com>
Wed, 7 Nov 2018 13:09:32 +0000 (14:09 +0100)
committerWilly Tarreau <w@1wt.eu>
Sun, 18 Nov 2018 21:10:09 +0000 (22:10 +0100)
For now, the filters are not compatible with the new HTX internal representation
of HTTP messages. Thus, for a given proxy, when the option "http-use-htx" is
enabled, an error is triggered if any filter is also configured.

src/filters.c

index 734058c5ce8bf4abe3065277cc3daa3c0ca73f9d..8bb9a904d3ff37b2379b89573b0c483be5ad31dd 100644 (file)
@@ -334,6 +334,15 @@ flt_check(struct proxy *proxy)
                        err += fconf->ops->check(proxy, fconf);
        }
        err += check_legacy_http_comp_flt(proxy);
+
+       if (!LIST_ISEMPTY(&proxy->filter_configs) &&
+           (proxy->options2 & PR_O2_USE_HTX)) {
+               ha_alert("config: %s '%s' : filters cannot be used when "
+                        "the HTX internal representation is enabled.\n",
+                        proxy_type_str(proxy), proxy->id);
+               err++;
+       }
+
        return err;
 }