curl / Mailing Lists / curl-users / Single Mail


Re: Fwd: Question on CURLE_RECV_ERROR (56)

From: Daniel Stenberg <>
Date: Sun, 14 Jan 2018 22:43:24 +0100 (CET)

On Sun, 14 Jan 2018, ghanashyam satpathy via curl-users wrote:

> Here is the verbose output using fiddler proxy(basic-auth) with invalid
> credentials.
>> curl -v -x --proxy-user foo:bar --proxy-basic http://

Ah right! Yes, now I get it.

libcurl atually doesn't return any error at all for this. You get a HTTP
response 407 back and libcurl returns CURLE_OK. That curl command line thus
returns a zero return code.

You can make the command return a failure by adding --fail. It will then
return 22 (CURLE_HTTP_RETURNED_ERROR) for this case

I don't understand why you'd get a CURLE_RECV_ERROR. Your curl command line
didn't say it exited with error 56, did it?

Received on 2018-01-14