cURL / Mailing Lists / curl-library / Single Mail


Re: libcurl function to specify IP address of webserver (bypassing DNS)

From: Daniel Stenberg <>
Date: Wed, 16 Jul 2003 00:36:33 +0200 (CEST)

On Tue, 8 Jul 2003, Henrik StÝrner wrote:

> So my question is: Would it be possible to implement a libcurl function that
> tells curl which IP-address to connect to, bypassing the normal DNS lookup ?
> Something like
> curl_easy_setopt(handle, CURLOPT_SERVER_IP, "");
> curl_easy_setopt(handle, CURLOPT_URL, "");
> curl_easy_perform(handle);
> I guess it *could* be done by mangling the URL to replace the hostname with
> the IP-address I want, then calling curl_easy_setopt with CURLOPT_HTTPHEADER
> and defining the "Host:" header. But I'd rather avoid mangling the URL
> myself.

I don't think this is a feture we need to add to libcurl, as you can make this
happen perfectly easy all by yourself. Yes, it requires you to parse and "fix"
the URL yourself, but it still is a pretty weird operation...

 Daniel Stenberg -- curl: been grokking URLs since 1998
This email is sponsored by: VM Ware
With VMware you can run multiple operating systems on a single machine.
WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines at the
same time. Free trial click here:
Received on 2003-07-16