aboutsummaryrefslogtreecommitdiff
path: root/lib/ftp.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2011-04-27 14:44:00 +0200
committerDaniel Stenberg <daniel@haxx.se>2011-04-28 15:08:09 +0200
commit3b1b26578f7b21e2bfca1d1738aa77a44e11e111 (patch)
tree8401506df2650608c1de9c919e31f73f46ad498d /lib/ftp.c
parent2cbe885c1a4d4f9b64fa0f41582e9d1b68affa25 (diff)
proxy: allow socks:// prefix in proxy string
Inspired by a patch from OB.Conseil. Added test case 708 to verify.
Diffstat (limited to 'lib/ftp.c')
-rw-r--r--lib/ftp.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/lib/ftp.c b/lib/ftp.c
index 38ec8e9d0..203afe6ba 100644
--- a/lib/ftp.c
+++ b/lib/ftp.c
@@ -1554,10 +1554,10 @@ static CURLcode ftp_state_pasv_resp(struct connectdata *conn,
newport = (unsigned short)(num & 0xffff);
if(conn->bits.tunnel_proxy ||
- data->set.proxytype == CURLPROXY_SOCKS5 ||
- data->set.proxytype == CURLPROXY_SOCKS5_HOSTNAME ||
- data->set.proxytype == CURLPROXY_SOCKS4 ||
- data->set.proxytype == CURLPROXY_SOCKS4A)
+ conn->proxytype == CURLPROXY_SOCKS5 ||
+ conn->proxytype == CURLPROXY_SOCKS5_HOSTNAME ||
+ conn->proxytype == CURLPROXY_SOCKS4 ||
+ conn->proxytype == CURLPROXY_SOCKS4A)
/* proxy tunnel -> use other host info because ip_addr_str is the
proxy address not the ftp host */
snprintf(newhost, sizeof(newhost), "%s", conn->host.name);
@@ -1610,10 +1610,10 @@ static CURLcode ftp_state_pasv_resp(struct connectdata *conn,
ip[0], ip[1], ip[2], ip[3],
conn->ip_addr_str);
if(conn->bits.tunnel_proxy ||
- data->set.proxytype == CURLPROXY_SOCKS5 ||
- data->set.proxytype == CURLPROXY_SOCKS5_HOSTNAME ||
- data->set.proxytype == CURLPROXY_SOCKS4 ||
- data->set.proxytype == CURLPROXY_SOCKS4A)
+ conn->proxytype == CURLPROXY_SOCKS5 ||
+ conn->proxytype == CURLPROXY_SOCKS5_HOSTNAME ||
+ conn->proxytype == CURLPROXY_SOCKS4 ||
+ conn->proxytype == CURLPROXY_SOCKS4A)
/* proxy tunnel -> use other host info because ip_addr_str is the
proxy address not the ftp host */
snprintf(newhost, sizeof(newhost), "%s", conn->host.name);
@@ -1715,7 +1715,7 @@ static CURLcode ftp_state_pasv_resp(struct connectdata *conn,
/* this just dumps information about this second connection */
ftp_pasv_verbose(conn, conninfo, newhost, connectport);
- switch(data->set.proxytype) {
+ switch(conn->proxytype) {
/* FIX: this MUST wait for a proper connect first if 'connected' is
* FALSE */
case CURLPROXY_SOCKS5: