cURL cURL > Mailing List > Monthly Index > Single Mail

curl-tracker Archives

[curl:bugs] #1473 Incomplete FTPS transfers through HTTP proxy

From: Marco De Vitis <starless_at_users.sf.net>
Date: Tue, 31 Mar 2015 12:15:58 +0000

The problem is still present.
I downloaded http://curl.haxx.se/snapshots/curl-7.42.0-20150331.tar.gz, built it with default configure, make, make install on another RHEL 6.3 machine, then copied the /usr/local/* curl-related content on the target machine which is behind the proxy, and launched the same test command using /usr/local/bin/curl, but I get the exact same result, the downloaded file is not complete.

I hope the process I used is OK. I do not have complete freedom of what I can do on the target machine. Here is what I get with curl -V after installing the daily snapshot this way:

    # /usr/local/bin/curl -V
    curl 7.42.0-20150331 (x86_64-unknown-linux-gnu) libcurl/7.42.0-20150331 OpenSSL/1.0.0 zlib/1.2.3 libidn/1.18
    Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtsp smb smbs smtp smtps telnet tftp
    Features: IDN IPv6 Largefile NTLM NTLM_WB SSL libz UnixSockets

---
** [bugs:#1473] Incomplete FTPS transfers through HTTP proxy**
**Status:** pending-needsinfo
**Labels:** proxy ftps 
**Created:** Tue Jan 20, 2015 10:14 AM UTC by Marco De Vitis
**Last Updated:** Wed Mar 18, 2015 07:16 PM UTC
**Owner:** Daniel Stenberg
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).
I attach a zip file containing a sample XML file I was downloading from the server, and the full --trace-ascii logs from 7.19.7 and 7.40.0 containing also curl -V output and the used command line.
In the trace for version 7.40 you can see that the transfer is interrupted before the complete XML file is downloaded.
---
Sent from sourceforge.net because curl-tracker@cool.haxx.se is subscribed to https://sourceforge.net/p/curl/bugs/
To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/curl/admin/bugs/options.  Or, if this is a mailing list, you can unsubscribe from the mailing list.
Received on 2015-03-31

These mail archives are generated by hypermail.