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

Reply via email to