mirror of
https://github.com/moparisthebest/curl
synced 2024-11-12 04:25:08 -05:00
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.
This commit is contained in:
parent
afecd1aa13
commit
4b2fbe1e97
@ -1642,12 +1642,8 @@ ossl_connect_step1(struct connectdata *conn,
|
|||||||
connssl->server_cert = 0x0;
|
connssl->server_cert = 0x0;
|
||||||
|
|
||||||
#ifdef SSL_CTRL_SET_TLSEXT_HOSTNAME
|
#ifdef SSL_CTRL_SET_TLSEXT_HOSTNAME
|
||||||
if((!data->state.this_is_a_follow ||
|
hostname = conn->allocptr.customhost?conn->allocptr.customhost:
|
||||||
Curl_raw_equal(data->state.first_host, conn->host.name)) &&
|
conn->host.name;
|
||||||
conn->allocptr.customhost)
|
|
||||||
hostname = conn->allocptr.customhost;
|
|
||||||
else
|
|
||||||
hostname = conn->host.name;
|
|
||||||
|
|
||||||
if ((0 == Curl_inet_pton(AF_INET, hostname, &addr)) &&
|
if ((0 == Curl_inet_pton(AF_INET, hostname, &addr)) &&
|
||||||
#ifdef ENABLE_IPV6
|
#ifdef ENABLE_IPV6
|
||||||
|
Loading…
Reference in New Issue
Block a user