cURL / Mailing Lists / curl-library / Single Mail

curl-library

DNS Lookups.

From: Keean Schupke <keean_at_fry-it.com>
Date: Thu, 31 Mar 2011 11:03:07 +0000

Hi,

We are using the CURLOPT_OPENSOCKETFUNCTION to open a socket to our
destination. We need to be able to replace the DNS lookup, as our socket
connect function takes the host name directly not an IP address. We can get
the hostname from curl_easy_getinfo with CURLINFO_EFFECTIVE_URL inside the
open-socket-function. What we need to do now is suppress the DNS lookup, as
the hostname will not be a resolvable name. Currently we push the name into
the DNS cache using CURLOPT_RESOLVE, but this does not work when the remote
server does a redirect.

Any suggestions as to the best way to disable DNS lookup for our non-DNS
hostnames?

Cheers,
Keean.

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2011-03-31