From 30f7a2ff20deea9b9950c54ec17c7ea9f7c77866 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Fri, 17 Apr 2009 12:48:24 +0000 Subject: - 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. --- lib/ftp.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'lib') 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; -- cgit v1.2.3