curl-library
Re: can curllib tell me the new url when it gets redirected?
From: Daniel Stenberg <daniel_at_haxx.se>
Date: Thu, 23 Oct 2008 16:25:44 +0200 (CEST)
Date: Thu, 23 Oct 2008 16:25:44 +0200 (CEST)
On Thu, 23 Oct 2008, Jan de Lint wrote:
> I used to use the CURLOPT_EFFECTIVE_URL to obtain the resulting URL after
> redirect. This did not work reliable in all versions of libcurl however.
> Hence my question.
AFAIK, that (CURLINFO_EFFECTIVE_URL)) has always returned the last fetched URL
and it's never been reported to be unreliable.
CURLINFO_REDIRECT_URL is used when you're _not_ following redirects (as the
man page says) so it can of course not return the "resulting URL after
redirect". It is the URL to which a redirect was requested but not followed
to.
-- / daniel.haxx.seReceived on 2008-10-23