-
-
Notifications
You must be signed in to change notification settings - Fork 6.9k
Description
When doing a FTPS connection through a HTTP proxy (Blue Coat ProxySG) and downloading a file using a clear data channel through the same proxy, the downloaded file is truncated.
As far as I can see it looks like curl is considering the "Connection established" header from the proxy as part of the file, and so closes the file transfer some bytes too early.
This happens with curl 7.40.0 on RedHat 6.3:
curl 7.40.0 (x86_64-redhat-linux-gnu) libcurl/7.40.0 OpenSSL/1.0.1e zlib/1.2.3 c-ares/1.10.0 libidn/1.18 libssh2/1.4.3
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtsp scp sftp smb smbs smtp smtps telnet tftp
Features: AsynchDNS IDN IPv6 Largefile GSS-API Kerberos SPNEGO NTLM NTLM_WB SSL libz UnixSockets Metalink
This is the command line I use:
curl --trace-ascii - -k --ftp-ssl-control --disable-epsv --proxy <proxyIP>:3128 --proxytunnel ftp://<ftpUser>:<ftpPassword>@<serverIP>//testpub.xml
The same operation works fine with older curl versions. It has been tested to work with versions 7.19.7, 7.25.0, 7.26.0 and 7.27.0, while it does NOT work with versions 7.29, 7.31, 7.38, 7.39 and 7.40, although I can't confirm the behaviour was always exactly the same (for example, I recall that with 7.29 the transfer just timed out).