curl-users
Re: Handling multiple redirects to various CGI scripts
Date: Mon, 24 Jan 2005 17:37:56 -0800
I used this and it works like a charm. Thank you very much.
HART, CHRISTOPHER T wrote:
>It might be that those subsequent redirects are handled through client-side scripting. The -L option only follows redirects that are issued as an HTTP 302 header redirect. If it is a client-side script, usually you can just write your script so that it makes the first request (using the -b and -c options to capture and provide any cookies you pick along the way), then make the subsequent requests using the same cookie file. (cURL won't handle or interpret VB/Java/ECMA-script; it's up to you to implement that manually.)
>
>Chris Hart
>
>-----Original Message-----
>From: curl-users-bounces_at_cool.haxx.se
>[mailto:curl-users-bounces_at_cool.haxx.se]On Behalf Of E. Mark Floyd II
>Sent: Friday, January 21, 2005 4:30 PM
>To: curl-users_at_cool.haxx.se
>Subject: Handling multiple redirects to various CGI scripts
>
>
>I wanted to know how to handle a multiple redirect using Curl, if it is
>possible (the documentation vaguely says it's possible). Here is the
>scenario we're trying to solve:
>
>"Use curl to script a login. The login is comprised of three parts.
> The initial curl call to login.cgi, which needs to be followed by
>subsequent cgi scripts which need to all happen in order to complete the
>login."
>
>I am currently using the -L option to handle unlimited number of
>redirects, but it always stops after login.cgi, the redirect at the 2nd
>step doesn't happen.
>
>Can someone please help shed some light on implementing this in Curl.
>
>Regards,
>
>Mark
>
>
>
-- To be conscious that you are ignorant is a great step to knowledge. Benjamin Disraeli (1804 - 1881), Sybil, 1845Received on 2005-01-25