]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: filters/htx: Use stream flags instead of px mode to instanciate a filter
authorChristopher Faulet <cfaulet@haproxy.com>
Fri, 5 Apr 2019 08:11:38 +0000 (10:11 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Fri, 12 Apr 2019 20:06:53 +0000 (22:06 +0200)
In the function flt_stream_add_filter(), if the HTX is enabled, before attaching
a filter to a stream, we test if the filter can handle it or not. If not, the
filter is ignored. Before the proxy mode was tested. Now we test if the stream
is an HTX stream or not.

src/filters.c

index 1a7727669b62e2f8fc28d8d668d0f49751527900..95ba7728bd09cd2e90b974de2ae0136d76b9f57e 100644 (file)
@@ -389,7 +389,7 @@ flt_stream_add_filter(struct stream *s, struct flt_conf *fconf, unsigned int fla
 {
        struct filter *f;
 
-       if ((strm_fe(s)->options2 & PR_O2_USE_HTX) && !(fconf->flags & FLT_CFG_FL_HTX))
+       if (IS_HTX_STRM(s) && !(fconf->flags & FLT_CFG_FL_HTX))
                return 0;
 
        f = pool_alloc(pool_head_filter);