]> granicus.if.org Git - curl/commitdiff
IDN host names: Remove the port number before converting to ACE
authorMichael Kaufmann <mail@michael-kaufmann.ch>
Fri, 8 Jan 2016 13:54:56 +0000 (14:54 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Sun, 10 Jan 2016 23:11:28 +0000 (00:11 +0100)
Closes #596

lib/url.c

index 75a1c444bdc7fcdbe86c6490427db9464b69a8d5..eaa282a04c73448061b4e7f38e3315ca5ae6e06c 100644 (file)
--- a/lib/url.c
+++ b/lib/url.c
@@ -5651,13 +5651,6 @@ static CURLcode create_conn(struct SessionHandle *data,
   if((conn->given->flags&PROTOPT_SSL) && conn->bits.httpproxy)
     conn->bits.tunnel_proxy = TRUE;
 
-  /*************************************************************
-   * IDN-fix the hostnames
-   *************************************************************/
-  fix_hostname(data, conn, &conn->host);
-  if(conn->proxy.name && *conn->proxy.name)
-    fix_hostname(data, conn, &conn->proxy);
-
   /*************************************************************
    * Figure out the remote port number and fix it in the URL
    *************************************************************/
@@ -5674,6 +5667,13 @@ static CURLcode create_conn(struct SessionHandle *data,
   if(result)
     goto out;
 
+  /*************************************************************
+   * IDN-fix the hostnames
+   *************************************************************/
+  fix_hostname(data, conn, &conn->host);
+  if(conn->proxy.name && *conn->proxy.name)
+    fix_hostname(data, conn, &conn->proxy);
+
   /*************************************************************
    * Setup internals depending on protocol. Needs to be done after
    * we figured out what/if proxy to use.