aboutsummaryrefslogtreecommitdiff
path: root/lib/ftp.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2000-09-14 14:05:01 +0000
committerDaniel Stenberg <daniel@haxx.se>2000-09-14 14:05:01 +0000
commit86ff2c46b73a2bbcd25edaf6a3c1d62c8a85f29d (patch)
tree323a2c756ca245619466eb55810904e9eae2d487 /lib/ftp.c
parentbe8b2a1e30d1066f85daff7a0d0a92910e50c089 (diff)
introduced 'tunnel through http proxy' for ftp
Diffstat (limited to 'lib/ftp.c')
-rw-r--r--lib/ftp.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/lib/ftp.c b/lib/ftp.c
index 71262012b..3d98efa58 100644
--- a/lib/ftp.c
+++ b/lib/ftp.c
@@ -372,6 +372,7 @@ CURLcode ftp_connect(struct connectdata *conn)
struct UrlData *data=conn->data;
char *buf = data->buffer; /* this is our buffer */
struct FTP *ftp;
+ CURLcode result;
myalarm(0); /* switch off the alarm stuff */
@@ -387,6 +388,13 @@ CURLcode ftp_connect(struct connectdata *conn)
ftp->user = data->user;
ftp->passwd = data->passwd;
+ if (data->bits.tunnel_thru_httpproxy) {
+ /* We want "seamless" FTP operations through HTTP proxy tunnel */
+ result = GetHTTPProxyTunnel(data, data->firstsocket);
+ if(CURLE_OK != result)
+ return result;
+ }
+
/* The first thing we do is wait for the "220*" line: */
nread = GetLastResponse(data->firstsocket, buf, conn);
if(nread < 0)
@@ -860,11 +868,17 @@ CURLcode _ftp(struct connectdata *conn)
}
return CURLE_FTP_CANT_RECONNECT;
}
- }
+ if (data->bits.tunnel_thru_httpproxy) {
+ /* We want "seamless" FTP operations through HTTP proxy tunnel */
+ result = GetHTTPProxyTunnel(data, data->secondarysocket);
+ if(CURLE_OK != result)
+ return result;
+ }
+ }
}
/* we have the (new) data connection ready */
- infof(data, "Connected!\n");
+ infof(data, "Connected the data stream!\n");
if(data->bits.upload) {