cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Name resolution when using a proxy

From: Karl M <karlm30_at_hotmail.com>
Date: Mon, 16 Jan 2006 17:03:07 -0800

Hi Daniel...

In one case the proxy can handle it. In the other case, the resolution is
via the hosts file on my computer, because there is no dns name for the
target. Is there a way I can get libcurl do the local resolution for me, or
do I need to do it myself before I pass it in to the curl_easy_setopt?

Thanks,

...Karl

>From: Daniel Stenberg Subject: Re: Name resolution when using a proxy
>Date: Mon, 16 Jan 2006 23:50:17 +0100 (CET)
>
>On Mon, 16 Jan 2006, Karl M wrote:
>
>(Please don't start a new thread by replying to an old mail, it makes
>threaded displays screwed up.)
>
>>At one time I thought I saw something on this, but now I can't find it in
>>the documentation. When I am using a proxy, how do I (or can I) control
>>whether the target url is resolved locally or by the proxy? I have
>>conditions where I need both choices.
>
>With HTTP the client hands over the full URL to the proxy and the proxy
>will resolve the host name.
>
>If you *really* want to do it client-side, then you need to first resolve
>the name and then "re-arrange" the URL to use IP numericals only and set
>the Host: header to contain the host name you resolved.
>
>--
> Commercial curl and libcurl Technical Support: http://haxx.se/curl.html
Received on 2006-01-17