cURL / Mailing Lists / curl-library / Single Mail

curl-library

Turning off DNS Caching of Failed Connections

From: Matt Marken <mattmarken28_at_gmail.com>
Date: Wed, 13 Oct 2010 13:29:44 -0400

   I am running into an issue where failed name resolutions are being cached
by curl even though I have DNS_CACHE_TIMEOUT set to not cache results.
(and have tried all other permutations and all options that looked even
vaguely DNS related).
For example, I can be running my application, pull the network cable, and
have name resolution fail for one of my requests and all future requests for
that
host even when the cable is reconnected. The behavior needed is, once the
network cable is reconnected, future requests to the host that failed
earlier
should resolve. Resolving via getaddrinfo outside of curl produces the
desired behavior. Calling res_init() before each curl request results in
the desired
behavior. It seems like I am missing what is required to achieve this
behavior directly in libcurl, however. Is this sort of behavior possible
via libcurl?

Thank you

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2010-10-13