cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Changed behaviour in curl-7.20.1 ?

From: Cosmin Luță <cosmin.luta_at_avira.com>
Date: Thu, 22 Apr 2010 15:20:24 +0300

On Thu, 22 Apr 2010 14:12:59 +0200 (CEST)
Daniel Stenberg <daniel_at_haxx.se> wrote:

> On Thu, 22 Apr 2010, Cosmin Luță wrote:
>
> > Can anyone tell me why with the new library the returned error code
> > is > "Couldn't connect to server" (which seems wrong to me imo)? Is
> > this exp
> ected > behaviour?
>
> Your callback returns error as soon as possible, and that as soon as
> poss ible was made slightly sooner in 7.20.1 since we made the
> callback also get ca lled during the name resolve and connect.
>
> So, when you return that early you cancel the connecting and then it
> isn' t crystal clear what the proper return code should be from
> libcurl!
>

Ok, I agree that this is a special case, but I find "couldn't connect"
a little misleading because the host is actually accessible and the
problem is a local one (local abort by callback). Think the old
return code was better, but anyway, this is what I wanted to know,
I'll update my source code.

Thanks!
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2010-04-22