]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: httpclient: enabled the use of SNI presets
authorMiroslav Zagorac <mzagorac@haproxy.com>
Mon, 19 Sep 2022 10:20:29 +0000 (12:20 +0200)
committerWilliam Lallemand <wlallemand@haproxy.org>
Mon, 19 Sep 2022 12:39:28 +0000 (14:39 +0200)
This commit allows setting SNI outside http_client.c code.

src/http_client.c

index b5588eb5e9665d82f4434a6f3a39390722025c3f..e2af029559572358838d7286759d6be1c5c33c5d 100644 (file)
@@ -1378,7 +1378,7 @@ static int httpclient_postcheck()
                                srv_ssl = srv;
                        }
                }
-               if (srv_ssl) {
+               if (srv_ssl && !srv_ssl->sni_expr) {
                        /* init the SNI expression */
                        /* always use the host header as SNI, without the port */
                        srv_ssl->sni_expr = strdup("req.hdr(host),field(1,:)");