]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
multi: accidentally used resolved host name instead of proxy
authorDaniel Stenberg <daniel@haxx.se>
Sat, 23 Apr 2016 20:46:15 +0000 (22:46 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Mon, 25 Apr 2016 21:31:55 +0000 (23:31 +0200)
Regression introduced in 09b5a998

Bug: https://curl.haxx.se/mail/lib-2016-04/0084.html
Reported-by: BoBo
lib/multi.c

index aec377d96c2f28596b3215160ed2d8243410dbfc..1184482f2c208ca73b9c8db22e50f3d1838b48a7 100644 (file)
@@ -1466,7 +1466,9 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi,
       struct connectdata *conn = data->easy_conn;
       const char *hostname;
 
-      if(conn->bits.conn_to_host)
+      if(conn->bits.proxy)
+        hostname = conn->proxy.name;
+      else if(conn->bits.conn_to_host)
         hostname = conn->conn_to_host.name;
       else
         hostname = conn->host.name;
@@ -1480,7 +1482,7 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi,
         conn->async.done = TRUE;
 #endif
         result = CURLE_OK;
-        infof(data, "Hostname was found in DNS cache\n");
+        infof(data, "Hostname '%s' was found in DNS cache\n", hostname);
       }
 
       if(!dns)