cURL uploads 0 length file for sftp transfer.

Brian Inglis Brian.Inglis@SystematicSw.ab.ca
Sun Sep 8 01:38:00 GMT 2019


On 2019-09-06 14:17, Yaakov Selkowitz wrote:
> On Fri, 2019-09-06 at 19:44 +0000, ALbert via cygwin wrote:
>> We recently upgraded cURL from version:curl 7.50.3 (i686-pc-cygwin)
>> libcurl/7.50.3 OpenSSL/1.0.2j zlib/1.2.8 libidn/1.29 libpsl/0.14.0
>> (+libidn/1.29) libssh2/1.7.0 nghttp2/1.14.0 to curl 7.64.1 (i686-pc-
>> cygwin) libcurl/7.65.3 OpenSSL/1.1.1c zlib/1.2.11 brotli/1.0.7
>> libidn2/2.2.0 libpsl/0.21.0 (+libidn2/2.0.4)
>> libssh/0.8.7/openssl/zlib nghttp2/1.37.0
> 
> Am I reading this right, curl 7.64.1 with libcurl 7.65.3?  Those
> versions should match exactly.
> 
>> Since the upgrade, we've seen problems uploading text files to sftp servers. Here's the call that we make:
>> curl--trace-ascii trace.txt -k sftp://<user>:<pass>@<server>/file.txt-T file.txt
>>
>> On initial call, a 0-length file is uploaded, with successful return code. On immediate rerun, a full file is uploaded (if we wait few minutes, 0-length file will get uploaded). Below are the traces from initial and subsequent calls. We also tried using same version curl on a linux box, without any issues. We also downloaded latest version of curl from curl for Windows, "curl 7.65.3 (i386-pc-win32) libcurl/7.65.3 OpenSSL/1.1.1c (Schannel) zlib/1.2.11 brotli/1.0.7 WinIDN libssh2/1.9.0 nghttp2/1.39.2", and its also working correctly.
>> Unfortunately, the server we're uploading to belongs to a client, and we can't see if this is an issue on a server side. However, even if it was, why would linux curl and windows curl (from curl.haxx.se) would work correctly?
>> Any help or pointers would be appreciated. Thank you.
> 
> Make sure you are using all the latest packages, especially that you
> have the latest and matching versions of curl and libcurl, and try
> again.

FYI Cygwin curl current version produces:
$ curl --version
curl 7.65.3 (x86_64-pc-cygwin) libcurl/7.65.3 OpenSSL/1.1.1c zlib/1.2.11
brotli/1.0.7 libidn2/2.2.0 libpsl/0.21.0 (+libidn2/2.0.4)
libssh/0.8.7/openssl/zlib nghttp2/1.37.0
Release-Date: 2019-07-19
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 brotli Debug GSS-API HTTP2 HTTPS-proxy IDN IPv6 Kerberos
Largefile libz Metalink NTLM NTLM_WB PSL SPNEGO SSL TLS-SRP TrackMemory UnixSockets

-- 
Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada

This email may be disturbing to some readers as it contains
too much technical detail. Reader discretion is advised.

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple



More information about the Cygwin mailing list