diff options
author | Michael Kaufmann <mail@michael-kaufmann.ch> | 2017-02-18 13:56:56 +0100 |
---|---|---|
committer | Michael Kaufmann <mail@michael-kaufmann.ch> | 2017-02-18 15:04:43 +0100 |
commit | 2f8d0df085519351dbd7123178895ba910d756c1 (patch) | |
tree | 1ec8c16fb218c3dcf26e90d183eb7aad5fecebc2 /lib/multi.c | |
parent | 13e3a18b345af1a15b892b0bbedfbbff06e10a39 (diff) |
proxy: fix hostname resolution and IDN conversion
Properly resolve, convert and log the proxy host names.
Support the "--connect-to" feature for SOCKS proxies and for passive FTP
data transfers.
Follow-up to cb4e2be
Reported-by: Jay Satiro
Fixes https://github.com/curl/curl/issues/1248
Diffstat (limited to 'lib/multi.c')
-rw-r--r-- | lib/multi.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/multi.c b/lib/multi.c index 950b600cb..04bf3f937 100644 --- a/lib/multi.c +++ b/lib/multi.c @@ -638,7 +638,10 @@ static CURLcode multi_done(struct connectdata **connp, infof(data, "Connection #%ld to host %s left intact\n", conn->connection_id, - conn->bits.httpproxy?conn->proxy.dispname:conn->host.dispname); + conn->bits.socksproxy ? conn->socks_proxy.host.dispname : + conn->bits.httpproxy ? conn->http_proxy.host.dispname : + conn->bits.conn_to_host ? conn->conn_to_host.dispname : + conn->host.dispname); } else data->state.lastconnect = NULL; @@ -1477,8 +1480,8 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi, struct connectdata *conn = data->easy_conn; const char *hostname; - if(conn->bits.proxy) - hostname = conn->proxy.name; + if(conn->bits.httpproxy) + hostname = conn->http_proxy.host.name; else if(conn->bits.conn_to_host) hostname = conn->conn_to_host.name; else |