curl / Mailing Lists / curl-users / Single Mail

curl-users

Re: Fwd: Question on CURLE_RECV_ERROR (56)

From: Daniel Stenberg <daniel_at_haxx.se>
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 http://127.0.0.1:8888 --proxy-user foo:bar --proxy-basic http://
> google.com"

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?

-- 
  / daniel.haxx.se
-----------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-users
Etiquette:   https://curl.haxx.se/mail/etiquette.html
Received on 2018-01-14