cURL
Haxx ad
libcurl

curl's project page on SourceForge.net

Sponsors:
Haxx

cURL > Mailing List > Monthly Index > Single Mail

curl-library Mailing List Archives

libcurl to download 0 size file

From: CHEN Xiaolei A <Xiaolei.a.Chen_at_alcatel-sbell.com.cn>
Date: Thu, 28 Oct 2010 16:54:27 +0800

Hi,

   I am using libcurl to download 0 size file from a SFTP server ( file size > 0 is OK ), but always failed for CURLE_TOO_MANY_REDIRECTS (libcurl error code 47).

   My environment:
   OS: Solaris 10
   Tools: openssl 0.9.8o + libssh2-1.2.6 + curl-7.21.0

 Libcurl debug trace below:

* Re-using existing connection! (#0) with host xx
* Connected to xx (xx) port 22 (#0)
* DO phase starts
* SFTP 0x5f028 state change from SSH_STOP to SSH_SFTP_QUOTE_INIT
* SFTP 0x5f028 state change from SSH_SFTP_QUOTE_INIT to SSH_SFTP_TRANS_INIT
* SFTP 0x5f028 state change from SSH_SFTP_TRANS_INIT to SSH_SFTP_DOWNLOAD_INIT
* SFTP 0x5f028 state change from SSH_SFTP_DOWNLOAD_INIT to SSH_SFTP_DOWNLOAD_STAT
* File already completely downloaded
* SFTP 0x5f028 state change from SSH_SFTP_DOWNLOAD_STAT to SSH_STOP
* DO phase is complete
* Connection died, retrying a fresh connect
* SFTP 0x5f028 state change from SSH_STOP to SSH_SFTP_CLOSE
* SFTP DONE done
* SFTP 0x5f028 state change from SSH_SFTP_CLOSE to SSH_STOP
* SSH DISCONNECT starts now
* SFTP 0x5f028 state change from SSH_STOP to SSH_SFTP_SHUTDOWN
* SFTP 0x5f028 state change from SSH_SFTP_SHUTDOWN to SSH_SESSION_DISCONNECT
* SFTP 0x5f028 state change from SSH_SESSION_DISCONNECT to SSH_SESSION_FREE
* SFTP 0x5f028 state change from SSH_SESSION_FREE to SSH_STOP
* SSH DISCONNECT is done
* Closing connection #0
* Number of redirects hit maximum amount

 My question: Is there any work around to avoid this error and download that 0 size file?

 Thanks.

Regards,
Atlantis

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2010-10-28

These mail archives are generated by hypermail.

donate! Page updated November 12, 2010.
web site info

File upload with ASP.NET