aboutsummaryrefslogtreecommitdiff
path: root/lib/url.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2013-10-26 20:19:27 +0200
committerDaniel Stenberg <daniel@haxx.se>2013-10-26 23:33:06 +0200
commitd44b0142714041b784ffd10792318674ecb1ed56 (patch)
treecad83bbb4196769983345ddf8eb310f9f39f8ca0 /lib/url.c
parent469b42335076b15ccfed1db411d3fadca699c39c (diff)
FTP: make the data connection work when going through proxy
This is a regression since the switch to always-multi internally c43127414d89c. Test 1316 was modified since we now clearly call the Curl_client_write() function when doing the LIST transfer part and then the handler->protocol says FTP and ftpc.transfertype is 'A' which implies text converting even though that the response is initially a HTTP CONNECT response in this case.
Diffstat (limited to 'lib/url.c')
-rw-r--r--lib/url.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/url.c b/lib/url.c
index c1672d08b..9973bd273 100644
--- a/lib/url.c
+++ b/lib/url.c
@@ -3219,9 +3219,12 @@ static CURLcode ConnectionStore(struct SessionHandle *data,
Note: this function's sub-functions call failf()
*/
-CURLcode Curl_connected_proxy(struct connectdata *conn)
+CURLcode Curl_connected_proxy(struct connectdata *conn,
+ int sockindex)
{
- if(!conn->bits.proxy)
+ if(!conn->bits.proxy || sockindex)
+ /* this magic only works for the primary socket as the secondary is used
+ for FTP only and it has FTP specific magic in ftp.c */
return CURLE_OK;
switch(conn->proxytype) {
@@ -3281,7 +3284,7 @@ static CURLcode ConnectPlease(struct SessionHandle *data,
conn->ip_addr = addr;
if(*connected) {
- result = Curl_connected_proxy(conn);
+ result = Curl_connected_proxy(conn, FIRSTSOCKET);
if(!result) {
conn->bits.tcpconnect[FIRSTSOCKET] = TRUE;
Curl_pgrsTime(data, TIMER_CONNECT); /* connect done */