aboutsummaryrefslogtreecommitdiff
path: root/lib/ftp.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2015-06-17 00:30:06 +0200
committerDaniel Stenberg <daniel@haxx.se>2015-06-17 14:00:12 +0200
commitb88f980a7437abc1159a1185c04d381347c8f5b1 (patch)
tree870afd06338a85f7dac3e1211dfd4a90c4860325 /lib/ftp.c
parent85739723ba9536cb1458f4bd2d00df4691b59bb1 (diff)
FTP: do the HTTP CONNECT for data connection blocking
** WORK-AROUND ** The introduced non-blocking general behaviour for Curl_proxyCONNECT() didn't work for the data connection establishment unless it was very fast. The newly introduced function argument makes it operate in a more blocking manner, more like it used to work in the past. This blocking approach is only used when the FTP data connecting through HTTP proxy. Blocking like this is bad. A better fix would make it work more asynchronously. Bug: https://github.com/bagder/curl/issues/278
Diffstat (limited to 'lib/ftp.c')
-rw-r--r--lib/ftp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/ftp.c b/lib/ftp.c
index de628a2dc..fade092e4 100644
--- a/lib/ftp.c
+++ b/lib/ftp.c
@@ -1887,7 +1887,7 @@ static CURLcode proxy_magic(struct connectdata *conn,
memset(&http_proxy, 0, sizeof(http_proxy));
data->req.protop = &http_proxy;
- result = Curl_proxyCONNECT(conn, SECONDARYSOCKET, newhost, newport);
+ result = Curl_proxyCONNECT(conn, SECONDARYSOCKET, newhost, newport, TRUE);
data->req.protop = ftp_save;
@@ -3645,7 +3645,7 @@ static CURLcode ftp_do_more(struct connectdata *conn, int *completep)
if(conn->tunnel_state[SECONDARYSOCKET] == TUNNEL_CONNECT) {
/* As we're in TUNNEL_CONNECT state now, we know the proxy name and port
aren't used so we blank their arguments. TODO: make this nicer */
- result = Curl_proxyCONNECT(conn, SECONDARYSOCKET, NULL, 0);
+ result = Curl_proxyCONNECT(conn, SECONDARYSOCKET, NULL, 0, FALSE);
return result;
}