cURL / Mailing Lists / curl-users / Single Mail

curl-users

Caching IP addresses ?

From: Doug McNutt <douglist_at_macnauchtan.com>
Date: Thu, 7 Aug 2008 13:02:59 -0600

I noticed yesterday that my scripted calls to the curl tool generate multiple requests to BIND for the same domain name as I work my way down into a site that I can't get to while bypassing the login shenanigans.

Has anyone done the work required to manage a cache of IP addresses to prevent that? A daemon process that preprocesses calls to curl that would otherwise create a new process comes to mind.

Does CurlLib have a capability like that that might push me over there? (Yeah, I probably ought to do that anyway.)

I could "dig" for the addresses and store them but I'm not so sure how to handle errors that would occur when things change. Does the curl tool return anything helpful for a second try when a dotted decimal address doesn't work? Can I expect web sites to complain when they see their addresses in dotted decimal rather than as a domain name?

How do web browsers handle their caching when an anchor points to a relative URL? Would I need to provide a replacement header line with the domain name when I provide a URL using dotted decimal?

-- 
--> A fair tax is one that you pay but I don't <--
-------------------------------------------------------------------
List admin: http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-users
FAQ:        http://curl.haxx.se/docs/faq.html
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2008-08-07