cURL / Mailing Lists / curl-library / Single Mail

curl-library

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

From: Geff <boing_at_boing.com>
Date: Wed, 12 Jul 2006 01:30:11 -0700

Paul,

That was suggested. It does seem like the only way libcurl will do what
I'd like. But I end up having to break up the URL on my own, which I
guess I can do if I go the libcurl route.

Thanks again, very helpful,

Geff

Paul Querna wrote:
> I haven't verified that this works, but perhaps you can just do this:
> curl_easy_setopt(curl, CURLOPT_URL, "http://1.2.3.4/path/foo");
> headerList = curl_slist_append(headerList, "Host: bar.example.com");
> curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headerList);
>
> Avoiding the whole thing....
>
> -Paul
Received on 2006-07-12