cURL / Mailing Lists / curl-library / Single Mail

curl-library

DNS caching ?

From: Anindya Sinha <as_vxml_at_yahoo.com>
Date: Tue, 27 Sep 2005 14:44:41 -0700 (PDT)

Hi

Just wanted to check if libcurl supports DNS caching
on an existing curl handle.

Let me explain:

If I create a curl handle (via curl_easy_init ()) and
use it to fetch from say, host.webserver.com. Say this
has 2 DNS entries ip1 and ip2. I know curl does a DNS
lookup and selects one of the 2 ip addresses and tries
to fetch the content; if it fails, it tries the next
ip address and so on till all ip addresses are tried.

If the content is fetched successfully, does it cache
this entry on that curl handle ? ie. if I were to
request libcurl to fetch another document (after 1st
successful fetch) from the same host.webserver.com,
does it use the ip address it used before for the 1st
fetch? Or is it a new request and goes through the
whole process again ? I am using the same curl handle
returned to me in curl_easy_init () for both requests.

Thanks
Anindya

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
Received on 2005-09-27