]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
url: fix null dispname for --connect-to option
authorShohei Maeda <11495867+smaeda-ks@users.noreply.github.com>
Fri, 12 May 2023 12:06:26 +0000 (21:06 +0900)
committerDaniel Stenberg <daniel@haxx.se>
Fri, 12 May 2023 15:52:07 +0000 (17:52 +0200)
Closes #11106

lib/url.c

index 71ca1b64e46b1dd668297c1ca073359600cde5fc..de70eee234b4ef70b0d3590543c8da45934f9877 100644 (file)
--- 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.