cURL / Mailing Lists / curl-library / Single Mail


Re: Re: IP addresses of redirected servers

From: <>
Date: Tue, 22 Feb 2011 22:28:04 +0000

Dirk and Daniel,

Thanks a lot for your suggestions.

Our application has been relying on libcurl for URL redirection. We would
need to rewrite a large portion of the code to handle URL redirection

Daniel, do you see a problem with extending libcurl in either of the
approach I suggested? I don't really mean: "I don't want to change my code,
so I will just mess around with libcurl". It is just that the extension to
libcurl seems pretty simple. So I suggested it.


On Feb 22, 2011 1:14pm, Daniel Stenberg <> wrote:
> On Tue, 22 Feb 2011, Bin Wang wrote:

> We use libcurl with CURLOPT_FOLLOWLOCATION option turned on. We have a
> need to obtain the IP addresses of all the servers libcurl tries to
> connect along the whole redirection process.

> Since libcurl currently does not provide this, I am thinking about
> extending libcurl. I can think of two approaches of doing this:

> Allow me to offer yet another way to solve your problem:


> 2. Use curl_easy_getinfo's CURLINFO_PRIMARY_IP to get the IP

> 3. Use curl_easy_getinfo's CURLINFO_REDIRECT_URL to extract redirect URLs
> and redirect there "manually".

> --

> /

> -------------------------------------------------------------------

> List admin:

> Etiquette:

List admin:
Received on 2011-02-22