curl-library
RE: curl-library Digest, Vol 53, Issue 4
Date: Tue, 5 Jan 2010 11:37:58 -0800
Hi,
Apologies for butting in, but...
No problem, any opinion may help.
If I remove the entry from "hosts" and try to post to it using libcurl, it
takes about 15-20 seconds for the call to curl_easy_perform to return with
an error CURLE_COULDNT_CONNECT, and during this time I don't get any calls
to the progress callback.
A DNS timeout typically happens after 4 seconds (2 seconds for each
nameserver) unless you've configured your local resolver differently. Is it
possible that the resolver your machine is using is working but returning a
different IP address to what you expect and are thus putting in your hosts
file?
I'm not sure I understand what you mean, at least in the context of my
question.
To summarize:
The libcurl I use is compiled to use c-ares as DNS resolver, and if I
understand things correctly, that should bypass any other DNS resolver. The
resolver seems to work correctly, as it succeeds when the entry is in the
hosts file, and it fails when the entry isn't. My issue is that in the case
where the entry is not in the host file, I don't get a chance to cancel the
request before the 15-20 seconds pass, whether it's trying to resolve the
name or doing something else. That would normally be done by receiving
periodic calls in the progress callback function, but that doesn't get
called for the whole duration of the request. That function gets called
however during a succesful request.
Thanks,
Adrian
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2010-01-05