curl-users
Re: Cookie problem
Date: Thu, 14 Dec 2006 09:04:35 -0600
On 12/14/06, Roger Price <rp272_at_cam.ac.uk> wrote:
>
> When I try to access a protected page I am directed to the authentication
> prompt. Clicking this sets a cookie for the listserver which I can save to
> file. Submitting the user ID and password sets another cookie for Raven.
> However when I am automatically directed back to the page I originally
> requested the listserver site modifies the cookie that it initially set. I
> can capture the first cookie but cannot seem to get the second.
>
Are you using curl's cookie management?? I.e. in *every* curl invocation,
do something like this:
curl -b cookies -c cookies ..... .... ...
That tells curl to load up any cookies it finds in a file called "cookies",
then to save the cookie stack back into the same file when the transfer is
over. Cookies will automatically be sent if they're relevant to the website
you're currently accessing.
The file does not have to exist for the first curl call. It will be created
and maintained for you.
Ralph Mitchell
Received on 2006-12-14