cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: can't get curl dns cache to work

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Wed, 3 Apr 2002 17:26:42 +0200 (MET DST)

On Thu, 4 Apr 2002, Phillip Stevens wrote:

> I'm having trouble manipulating the curl dns cache. The cache seems to be
> turned on by default, however it doesn't seem to be timing out by default.
> If I indefinitely request a web page via a perl script and then I kill the
> dns server during the process, the perl script will continue to retrieve
> the page indefinitely (does not fail after 60 seconds). I let the script
> run for several minutes, it was still retrieving the page successfully.
>
> Neither CURLOPT_DNS_CACHE_TIMEOUT or CURLOPT_DNS_USE_GLOBAL_CACHE seems to
> have any effect. If I change the timeout to 10 seconds nothing changes. The
> cache doesn't time out. I must be doing something wrong.

This sounds as if there's a bug in there or something.

The code to study is the Curl_resolv() function in lib/hostip.c. I'll have a
go myself "soon" if no one else does it.

-- 
    Daniel Stenberg -- curl groks URLs -- http://curl.haxx.se/
Received on 2002-04-03