On Fri, 14 Jun 2013, Jin wrote:

So I'm using IP resolve option(CURLOPT_RESOLVE) when downloading file from individual servers.

But when I'm going to use HTTP proxy, it doesn't resolve IP address correctly.

Correct. When you're using a HTTP proxy and pass on a host name based URL, you leave it to the proxy to resolve the host name to IP address and the client can't affect that in any way. libcurl doesn't do the name => IP translation for this case (which you can possibly argue that it should when CURLOPT_RESOLVE has been used for the host name),

If you want to speak to a specific IP address over a HTTP proxy, you need to use that IP address in the URL - and then set the correct host name in the Host: header.

--

 / daniel.haxx.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html

Reply via email to