curl-users
Re: How to get around 302 Object Moved....
Date: Wed, 23 Nov 2005 16:42:33 +0100 (CET)
On Wed, 23 Nov 2005, R. Blaine Mincey wrote:
> What actually happens in the script is that when I receive the 302 status,
> the action I am doing an HTTP get on is not executing.
If you get a 302 response with a Location: header, setting FOLLOWLOCATION will
make libcurl follow the redirect and thus make a subsequent request to the new
URL (or URLs - plural - if you get a chain of redirects).
> And, in looking at the output from libcurl, it indicates I need to issue
> another request to the login url.
No, it means that it will make another request to that URL.
> I guess this is what is confusing me as I am logging in with my
> digital cert, parsing data, and when I get the 302, it is indicating I need
> to login.
> I am beginning to wonder if there is some type of session variable that is
> set at the server side.
It certainly looks like that, yes. It is a very common technique in web
applications in case of "session" failures.
-- Commercial curl and libcurl Technical Support: http://haxx.se/curl.htmlReceived on 2005-11-23