aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2009-04-17 12:48:24 +0000
committerDaniel Stenberg <daniel@haxx.se>2009-04-17 12:48:24 +0000
commit30f7a2ff20deea9b9950c54ec17c7ea9f7c77866 (patch)
tree2294afb155b8851350d464f44bae8b43918e6f71 /lib
parentf6b55fae7971f63d5e02efad9d97d3b04f417f63 (diff)
- Pramod Sharma reported and tracked down a bug when doing FTP over a HTTP
proxy. libcurl would then wrongly close the connection after each request. In his case it had the weird side-effect that it killed NTLM auth for the proxy causing an inifinite loop! I added test case 1098 to verify this fix. The test case does however not properly verify that the transfers are done persistently - as I couldn't think of a clever way to achieve it right now - but you need to read the stderr output after a test run to see that it truly did the right thing.
Diffstat (limited to 'lib')
-rw-r--r--lib/ftp.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/ftp.c b/lib/ftp.c
index 5282204a7..1fa93dd37 100644
--- a/lib/ftp.c
+++ b/lib/ftp.c
@@ -4146,7 +4146,12 @@ static CURLcode ftp_setup_connection(struct connectdata * conn)
return CURLE_UNSUPPORTED_PROTOCOL;
#endif
}
-
+ /*
+ * We explicitly mark this connection as persistent here as we're doing
+ * FTP over HTTP and thus we accidentally avoid setting this value
+ * otherwise.
+ */
+ conn->bits.close = FALSE;
#else
failf(data, "FTP over http proxy requires HTTP support built-in!");
return CURLE_UNSUPPORTED_PROTOCOL;