cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: curl_easy_setopt to allow for specifying the IP for connect() ?

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Wed, 12 Jul 2006 00:51:37 +0200 (CEST)

On Tue, 11 Jul 2006, Geff wrote:

> I appreciate that point of view (/etc/hosts). However I was hoping not to
> adjust the system settings (resolv.conf / nsswitch.conf / etc) for a
> library.

I can see how you were hoping for this and I can indeed sympatize for your
case. Still, I gotta take a wider picture into consideration and ponder if
adding this functionality is in the best interest of libcurl and libcurl-using
applications.

> So at this point I'm stuck with using the library as is or altering the
> resolution properties at the system level.

Yes, or applying your private patch. Or doing some fun link magic to replace
functions to cause the resolves to fail. Or using chroot or similar to have
your test environment execute in an alternative path where you can modify
hosts and resolv.conf etc without affecting the rest of the system. Or
providing a "spoofed" DNS server that can NAK certain resolves. Or...

As I see it, you have quite a range of options to choose from.

> If you're unwilling to take a patch to populate the cache and to
> "CACHE_ONLY" resolve, please confirm that definitively. I don't want to
> waste the time writing the patch if you won't take it.

Right now I'm definitively against it because I don't see any good enough
arguments for me to think otherwise, and also there's no one else to speak up
for the inclusion of this esoteric option set.

I'm always ready to reconsider my previous decisions if I get good arguments
for it.

-- 
  Commercial curl and libcurl Technical Support: http://haxx.se/curl.html
Received on 2006-07-12