]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: http_client: make sure to preset the proxy's default settings
authorWilly Tarreau <w@1wt.eu>
Fri, 20 Aug 2021 08:23:12 +0000 (10:23 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 20 Aug 2021 08:23:12 +0000 (10:23 +0200)
Proxies must call proxy_preset_defaults() to initialize their settings
that are usually learned from defaults sections (e.g. connection retries,
pool purge delay etc). At the moment there was likely no impact, but not
doing so could cause trouble soon when using the client more extensively
or when new defaults are introduced and failed to be initialized.

No backport is needed.

src/http_client.c

index b949e09d2b834033abfeeb46947eae7ab123dd37..6142c4857ec83e7840cbfeb846eee254ef0aac85 100644 (file)
@@ -657,6 +657,8 @@ static int httpclient_init()
                goto err;
        }
 
+       proxy_preset_defaults(httpclient_proxy);
+
        httpclient_proxy->options2 |= PR_O2_INDEPSTR;
        httpclient_proxy->mode = PR_MODE_HTTP;
        httpclient_proxy->maxconn = 0;