summaryrefslogtreecommitdiff
path: root/lib/url.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/url.c')
-rw-r--r--lib/url.c27
1 files changed, 15 insertions, 12 deletions
diff --git a/lib/url.c b/lib/url.c
index f2ad31742..78f01c442 100644
--- a/lib/url.c
+++ b/lib/url.c
@@ -2060,18 +2060,6 @@ static CURLcode parseurlandfillconn(struct Curl_easy *data,
if(result)
return result;
}
-#ifndef CURL_DISABLE_PROXY
- if(conn->bits.httpproxy) {
- result = Curl_idnconvert_hostname(data, &conn->http_proxy.host);
- if(result)
- return result;
- }
- if(conn->bits.socksproxy) {
- result = Curl_idnconvert_hostname(data, &conn->socks_proxy.host);
- if(result)
- return result;
- }
-#endif
#ifndef CURL_DISABLE_HSTS
/* HSTS upgrade */
@@ -3731,6 +3719,21 @@ static CURLcode create_conn(struct Curl_easy *data,
if(result)
goto out;
+ /*************************************************************
+ * IDN-convert the proxy hostnames
+ *************************************************************/
+#ifndef CURL_DISABLE_PROXY
+ if(conn->bits.httpproxy) {
+ result = Curl_idnconvert_hostname(data, &conn->http_proxy.host);
+ if(result)
+ return result;
+ }
+ if(conn->bits.socksproxy) {
+ result = Curl_idnconvert_hostname(data, &conn->socks_proxy.host);
+ if(result)
+ return result;
+ }
+#endif
/*************************************************************
* Check whether the host and the "connect to host" are equal.