From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 97567 invoked by alias); 6 Sep 2019 19:44:22 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 97552 invoked by uid 89); 6 Sep 2019 19:44:22 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=1.1 required=5.0 tests=BAYES_50,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,HTML_MESSAGE,KAM_SHORT,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=no version=3.3.1 spammy=H*F:D*yahoo.com, H*x:WebService, H*x:Mozilla, H*x:20100101 X-HELO: sonic303-22.consmr.mail.ne1.yahoo.com Received: from sonic303-22.consmr.mail.ne1.yahoo.com (HELO sonic303-22.consmr.mail.ne1.yahoo.com) (66.163.188.148) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 06 Sep 2019 19:44:19 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1567799057; bh=f+N5OxOL87xmfr8Q+THkgGV67rFKGQbvgFcYIiIaiqw=; h=Date:From:To:Subject:References:From:Subject; b=CV5d8/3oq4ft3RkAmHe+XPKUoMOQtiKlz1o/5gfFTWDJWHA0Hu98ZHyMC71n4XKxL+W3de5Zr59aqZ3Xhm4EmHZliwURdgzAVkReO+81lFIgtuEUvHqjUL+0g0EYAyv5uhj9aboUz959LoWqhc26LwJHVnfWTUbvfmntQW1mNwfQeadSohKw7BzZbp3euNpcYgzUamRIFnSzMO8dV/5uAg9SGftW4u5IX1PfuVwUVHbf60C5feuLwO0Wn4YG59bG+qu+1ok9bpDDXAz+D2RNtziMGOyvNGBU3sScU8bbMd+os8uBhwCNDCDauG06x5bYZ/XbeZwvy7xx46sUdtFqpg== Received: from sonic.gate.mail.ne1.yahoo.com by sonic303.consmr.mail.ne1.yahoo.com with HTTP; Fri, 6 Sep 2019 19:44:17 +0000 Date: Fri, 06 Sep 2019 19:44:00 -0000 From: "ALbert via cygwin" Reply-To: ALbert To: "cygwin@cygwin.com" Message-ID: <154000859.3440830.1567799052771@mail.yahoo.com> Subject: cURL uploads 0 length file for sftp transfer. MIME-Version: 1.0 References: <154000859.3440830.1567799052771.ref@mail.yahoo.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-SW-Source: 2019-09/txt/msg00059.txt.bz2 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.0tocurl 7.64.1 (i686-pc-cygwin) libcurl/7.65.3 O= penSSL/1.1.1c zlib/1.2.11 brotli/1.0.7 libidn2/2.2.0 libpsl/0.21.0 (+libidn= 2/2.0.4) libssh/0.8.7/openssl/zlib nghttp2/1.37.0 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://:@/file.txt-T fil= e.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-leng= th file will get uploaded). Below are the traces from initial and subsequen= t 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, "c= url 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 workin= g correctly. Unfortunately, the server we're uploading to belongs to a client, and we ca= n'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. Here's the trace files: >From initial call:=3D=3D Info: STATE: INIT =3D> CONNECT handle 0x80068340;= line 1356 (connection #-5000) =3D=3D Info: Added connection 0. The cache now contains 1 members =3D=3D Info: STATE: CONNECT =3D> WAITRESOLVE handle 0x80068340; line 1397 (= connection #0) =3D=3D Info:=C2=A0=C2=A0 Trying XXX.XX.XX.XX...=3D=3D Info: TCP_NODELAY set =3D=3D Info: STATE: WAITRESOLVE =3D> WAITCONNECT handle 0x80068340; line 14= 76 (connection #0) =3D=3D Info: Connected to=C2=A0XXXXXXX ( XXX.XX.XX.XX) port 22 (#0)=3D=3D = Info: STATE: WAITCONNECT =3D> SENDPROTOCONNECT handle 0x80068340; line 1532= (connection #0) =3D=3D Info: Marked for [keep alive]: SSH default =3D=3D Info: User: Opus_efg =3D=3D Info: SSH 0x80048f90 state change from SSH_STOP to SSH_INIT (line 21= 15) =3D=3D Info: SSH 0x80048f90 state change from SSH_INIT to SSH_S_STARTUP (li= ne 582) =3D=3D Info: STATE: SENDPROTOCONNECT =3D> PROTOCONNECT handle 0x80068340; l= ine 1547 (connection #0) =3D=3D Info: SSH 0x80048f90 state change from SSH_S_STARTUP to SSH_HOSTKEY = (line 595) =3D=3D Info: SSH 0x80048f90 state change from SSH_HOSTKEY to SSH_AUTHLIST (= line 605) =3D=3D Info: SSH 0x80048f90 state change from SSH_AUTHLIST to SSH_AUTH_PKEY= _INIT (line 628) =3D=3D Info: Authentication using SSH public key file =3D=3D Info: SSH 0x80048f90 state change from SSH_AUTH_PKEY_INIT to SSH_AUT= H_KEY_INIT (line 697) =3D=3D Info: SSH 0x80048f90 state change from SSH_AUTH_KEY_INIT to SSH_AUTH= _KEY (line 743) =3D=3D Info: completed keyboard interactive authentication =3D=3D Info: SSH 0x80048f90 state change from SSH_AUTH_KEY to SSH_AUTH_DONE= (line 761) =3D=3D Info: Authentication complete =3D=3D Info: SSH 0x80048f90 state change from SSH_AUTH_DONE to SSH_SFTP_INI= T (line 807) =3D=3D Info: SSH 0x80048f90 state change from SSH_SFTP_INIT to SSH_SFTP_REA= LPATH (line 833) =3D=3D Info: SSH CONNECT phase done =3D=3D Info: SSH 0x80048f90 state change from SSH_SFTP_REALPATH to SSH_STOP= (line 850) =3D=3D Info: STATE: PROTOCONNECT =3D> DO handle 0x80068340; line 1566 (conn= ection #0) =3D=3D Info: DO phase starts =3D=3D Info: SSH 0x80048f90 state change from SSH_STOP to SSH_SFTP_QUOTE_IN= IT (line 2332) =3D=3D Info: SSH 0x80048f90 state change from SSH_SFTP_QUOTE_INIT to SSH_SF= TP_GETINFO (line 868) =3D=3D Info: SSH 0x80048f90 state change from SSH_SFTP_GETINFO to SSH_SFTP_= TRANS_INIT (line 1060) =3D=3D Info: SSH 0x80048f90 state change from SSH_SFTP_TRANS_INIT to SSH_SF= TP_UPLOAD_INIT (line 1080) =3D=3D Info: SSH 0x80048f90 state change from SSH_SFTP_UPLOAD_INIT to SSH_S= FTP_CLOSE (line 1143) =3D=3D Info: STATE: DO =3D> DOING handle 0x80068340; line 1608 (connection = #0) =3D=3D Info: SFTP DONE done =3D=3D Info: SSH 0x80048f90 state change from SSH_SFTP_CLOSE to SSH_STOP (l= ine 1651) =3D=3D Info: DO phase is complete =3D=3D Info: STATE: DOING =3D> DO_DONE handle 0x80068340; line 1693 (connec= tion #0) =3D=3D Info: STATE: DO_DONE =3D> PERFORM handle 0x80068340; line 1743 (conn= ection #0) =3D=3D Info: STATE: PERFORM =3D> DONE handle 0x80068340; line 1933 (connect= ion #0) =3D=3D Info: multi_done =3D=3D Info: SSH 0x80048f90 state change from SSH_STOP to SSH_SFTP_CLOSE (l= ine 2390) =3D=3D Info: SFTP DONE done =3D=3D Info: SSH 0x80048f90 state change from SSH_SFTP_CLOSE to SSH_STOP (l= ine 1651) =3D=3D Info: Connection #0 to host XXXXXXX left intact Trace from subsequent call:=3D=3D Info: STATE: INIT =3D> CONNECT handle 0x8= 0068340; line 1356 (connection #-5000) =3D=3D Info: Added connection 0. The cache now contains 1 members =3D=3D Info: STATE: CONNECT =3D> WAITRESOLVE handle 0x80068340; line 1397 (= connection #0) =3D=3D Info:=C2=A0=C2=A0 Trying XXX.XX.XX.XX...=3D=3D Info: TCP_NODELAY set =3D=3D Info: STATE: WAITRESOLVE =3D> WAITCONNECT handle 0x80068340; line 14= 76 (connection #0) =3D=3D Info: Connected to XXXXXXX (XXX.XX.XX.XX) port 22 (#0) =3D=3D Info: STATE: WAITCONNECT =3D> SENDPROTOCONNECT handle 0x80068340; li= ne 1532 (connection #0) =3D=3D Info: Marked for [keep alive]: SSH default =3D=3D Info: User: Opus_efg =3D=3D Info: SSH 0x80048f90 state change from SSH_STOP to SSH_INIT (line 21= 15) =3D=3D Info: SSH 0x80048f90 state change from SSH_INIT to SSH_S_STARTUP (li= ne 582) =3D=3D Info: STATE: SENDPROTOCONNECT =3D> PROTOCONNECT handle 0x80068340; l= ine 1547 (connection #0) =3D=3D Info: SSH 0x80048f90 state change from SSH_S_STARTUP to SSH_HOSTKEY = (line 595) =3D=3D Info: SSH 0x80048f90 state change from SSH_HOSTKEY to SSH_AUTHLIST (= line 605) =3D=3D Info: SSH 0x80048f90 state change from SSH_AUTHLIST to SSH_AUTH_PKEY= _INIT (line 628) =3D=3D Info: Authentication using SSH public key file =3D=3D Info: SSH 0x80048f90 state change from SSH_AUTH_PKEY_INIT to SSH_AUT= H_KEY_INIT (line 697) =3D=3D Info: SSH 0x80048f90 state change from SSH_AUTH_KEY_INIT to SSH_AUTH= _KEY (line 743) =3D=3D Info: completed keyboard interactive authentication =3D=3D Info: SSH 0x80048f90 state change from SSH_AUTH_KEY to SSH_AUTH_DONE= (line 761) =3D=3D Info: Authentication complete =3D=3D Info: SSH 0x80048f90 state change from SSH_AUTH_DONE to SSH_SFTP_INI= T (line 807) =3D=3D Info: SSH 0x80048f90 state change from SSH_SFTP_INIT to SSH_SFTP_REA= LPATH (line 833) =3D=3D Info: SSH CONNECT phase done =3D=3D Info: SSH 0x80048f90 state change from SSH_SFTP_REALPATH to SSH_STOP= (line 850) =3D=3D Info: STATE: PROTOCONNECT =3D> DO handle 0x80068340; line 1566 (conn= ection #0) =3D=3D Info: DO phase starts =3D=3D Info: SSH 0x80048f90 state change from SSH_STOP to SSH_SFTP_QUOTE_IN= IT (line 2332) =3D=3D Info: SSH 0x80048f90 state change from SSH_SFTP_QUOTE_INIT to SSH_SF= TP_GETINFO (line 868) =3D=3D Info: SSH 0x80048f90 state change from SSH_SFTP_GETINFO to SSH_SFTP_= TRANS_INIT (line 1060) =3D=3D Info: SSH 0x80048f90 state change from SSH_SFTP_TRANS_INIT to SSH_SF= TP_UPLOAD_INIT (line 1080) =3D=3D Info: SSH 0x80048f90 state change from SSH_SFTP_UPLOAD_INIT to SSH_S= TOP (line 1222) =3D=3D Info: DO phase is complete =3D=3D Info: STATE: DO =3D> DO_DONE handle 0x80068340; line 1621 (connectio= n #0) =3D=3D Info: STATE: DO_DONE =3D> PERFORM handle 0x80068340; line 1743 (conn= ection #0) =3D> Send data, 10688 bytes (0x29c0) =C2=A0 SENSITIVE DATA DELETED =3D=3D Info: We are completely uploaded and fine =3D=3D Info: STATE: PERFORM =3D> DONE handle 0x80068340; line 1933 (connect= ion #0) =3D=3D Info: multi_done =3D=3D Info: SSH 0x80048f90 state change from SSH_STOP to SSH_SFTP_CLOSE (l= ine 2390) =3D=3D Info: SFTP DONE done =3D=3D Info: SSH 0x80048f90 state change from SSH_SFTP_CLOSE to SSH_STOP (l= ine 1651) =3D=3D Info: Connection #0 to host XXXXXXX left intact =3D=3D Info: Expire cleared (transfer 0x80068340) =20 -- 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