aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2010-11-04 15:16:27 +0100
committerDaniel Stenberg <daniel@haxx.se>2010-11-04 15:16:27 +0100
commit4b2fbe1e97891f9a861363c4bf7aa0473c94e0ab (patch)
tree880bfe5ca010a50f2f8b3596276870896a5c5e39 /lib
parentafecd1aa13b4f40c54d195514af113715b0e0f9f (diff)
SNI: simplify the custom host name use
The redirect check is already done at the position where the customhost field is assigned so there's no point in doing that a second time.
Diffstat (limited to 'lib')
-rw-r--r--lib/ssluse.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/lib/ssluse.c b/lib/ssluse.c
index 01e688c7d..b3a05f907 100644
--- a/lib/ssluse.c
+++ b/lib/ssluse.c
@@ -1642,12 +1642,8 @@ ossl_connect_step1(struct connectdata *conn,
connssl->server_cert = 0x0;
#ifdef SSL_CTRL_SET_TLSEXT_HOSTNAME
- if((!data->state.this_is_a_follow ||
- Curl_raw_equal(data->state.first_host, conn->host.name)) &&
- conn->allocptr.customhost)
- hostname = conn->allocptr.customhost;
- else
- hostname = conn->host.name;
+ hostname = conn->allocptr.customhost?conn->allocptr.customhost:
+ conn->host.name;
if ((0 == Curl_inet_pton(AF_INET, hostname, &addr)) &&
#ifdef ENABLE_IPV6