url: fix null dispname for --connect-to option

Closes #11106
This commit is contained in:
Shohei Maeda 2023-05-12 21:06:26 +09:00 committed by Daniel Stenberg
parent efa6c644aa
commit ac5ad52142
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2

View File

@ -1816,11 +1816,6 @@ static CURLcode parseurlandfillconn(struct Curl_easy *data,
result = Curl_idnconvert_hostname(&conn->host); result = Curl_idnconvert_hostname(&conn->host);
if(result) if(result)
return result; return result;
if(conn->bits.conn_to_host) {
result = Curl_idnconvert_hostname(&conn->conn_to_host);
if(result)
return result;
}
#ifndef CURL_DISABLE_HSTS #ifndef CURL_DISABLE_HSTS
/* HSTS upgrade */ /* HSTS upgrade */
@ -3480,6 +3475,11 @@ static CURLcode create_conn(struct Curl_easy *data,
return result; return result;
} }
#endif #endif
if(conn->bits.conn_to_host) {
result = Curl_idnconvert_hostname(&conn->conn_to_host);
if(result)
return result;
}
/************************************************************* /*************************************************************
* Check whether the host and the "connect to host" are equal. * Check whether the host and the "connect to host" are equal.