From: Shohei Maeda <11495867+smaeda-ks@users.noreply.github.com> Date: Fri, 12 May 2023 12:06:26 +0000 (+0900) Subject: url: fix null dispname for --connect-to option X-Git-Tag: curl-8_1_0~11 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ac5ad5214261a2237bdbe344708f9d32c9393fd6;p=thirdparty%2Fcurl.git url: fix null dispname for --connect-to option Closes #11106 --- diff --git a/lib/url.c b/lib/url.c index 71ca1b64e4..de70eee234 100644 --- a/lib/url.c +++ b/lib/url.c @@ -1816,11 +1816,6 @@ static CURLcode parseurlandfillconn(struct Curl_easy *data, result = Curl_idnconvert_hostname(&conn->host); if(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 /* HSTS upgrade */ @@ -3480,6 +3475,11 @@ static CURLcode create_conn(struct Curl_easy *data, return result; } #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.