]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: config: make compression work again in defaults section
authorWilly Tarreau <w@1wt.eu>
Wed, 10 May 2023 14:39:00 +0000 (16:39 +0200)
committerWilly Tarreau <w@1wt.eu>
Wed, 10 May 2023 14:41:21 +0000 (16:41 +0200)
When commit ead43fe4f ("MEDIUM: compression: Make it so we can compress
requests as well.") added the test for the direction flags to select the
compression, it implicitly broke compression defined in defaults sections
because the flags from the default proxy were not recopied, hence the
compression was enabled but in no direction.

No backport is needed, that's 2.8 only.

src/proxy.c

index 2b79dea4753653bcdc9dbcaf03271740d1db06d7..b614e345bd34d49c249d18825ebf76f60c1ccd8a 100644 (file)
@@ -1905,6 +1905,7 @@ static int proxy_defproxy_cpy(struct proxy *curproxy, const struct proxy *defpro
                curproxy->comp->algo_req = defproxy->comp->algo_req;
                curproxy->comp->types_res = defproxy->comp->types_res;
                curproxy->comp->types_req = defproxy->comp->types_req;
+               curproxy->comp->flags = defproxy->comp->flags;
        }
 
        if (defproxy->check_path)