cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Curl returning 0 return code during error

From: Michael Lam <Michael.Lam_at_silkroad.com>
Date: Thu, 5 Jan 2012 13:45:09 -0500

> we were running curl to ftp a file to the client, we got the destination
> folder wrong but somehow still got 0 as return code. The return message
> told us there was error. This is very confusing, is there a way to fix this
> without having to parse the return message? I don't think --fail would work
> because it pertains to http servers. Thanks.

Sounds like a bug to me. Can you tell us which libcurl version this was and
can you show us the VERBOSE output of the relevant pieces of the protocol
exchange that lead to the failure?

--
  / daniel.haxx.se
Here is the information you are looking for.
version  : 7.23.1 RTMP SSH2 SSL SSPI LIBZ WINIDN (64 Bit)
requires : OpenSSL 1.0.0e DLLs (included) normaliz.dll (with Windows Vista or higher included)
license  : http://curl.haxx.se/docs/copyright.html
built by : G. Knauf <info_at_gknw.de>
Output:
Execution Result Name 
 Success 
 
  Start Time 
 12/29/2011 5:28:46 PM 
 
  Completion Time 
 12/29/2011 5:28:49 PM 
 
  Exit Code 
 0 
 
  Output 
 dr--r--r-- 1 0 0 96 Dec 29 03:58 .ssh 
 
  Error Output 
 curl: Can't open 'D:\JobQueueShare\File'! 
curl: try 'curl --help' or 'curl --manual' for more information 
* About to connect() to 155.199.204.69 port 22 (#0) 
* Trying 155.199.204.69... % Total % Received % Xferd Average Speed Time Time Time Current 
Dload Upload Total Spent Left Speed 
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0connected 
* SSH authentication methods available: publickey,password 
* Using ssh public key file D:\JobQueueShare\FidelityKeys\id_rsa.pub 
* Using ssh private key file D:\JobQueueShare\FidelityKeys\id_rsa 
* Initialized SSH public key authentication 
* Authentication complete 
0 0 0 0 0 0 0 0 --:--:-- 0:00:01 --:--:-- 0} [data not shown] 
0 0 0 0 0 0 0 0 --:--:-- 0:00:01 --:--:-- 0 
0 0 0 0 0 0 0 0 --:--:-- 0:00:01 --:--:-- 0 
* Connection #0 to host 155.199.204.69 left intact 
* Closing connection #0
 
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2012-01-05