cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: Cookies in a file

From: Kevin P Roth <kproth_at_MarathonOil.com>
Date: Wed, 25 Oct 2000 12:01:15 -0500

>>> Daniel Stenberg <daniel_at_haxx.se> 10/25/00 11:20 AM >>>
> The -b cookie reading function also supports reading the same cookie
> name several times and only using the last one, so if you do append
> the headers in cronological order it could work.

> Yes it blanks the -D file. Still, you could easily make a script that
> would append several -D dumped files into one.

> You don't have to filter out the Set-cookie lines, just append all the
> headers. Curl's cookie parser skips the non-cookie related lines.

Thanks for the info - if I don't find this in the rest of the docs, and I find a little time, I'll probably update the documentation and send you a diff.

> I've received this request before, and I do like the idea. This feature would
> then store the "state" of the browsing to allow sequential invokes/uses to
> pick up exactly where the last invoke left it (which would include cookies,
> referer and other things).
> As many other never-implemented suggestions, this hasn't been introduced
> since no one has volounteered to write the code, not even partly.
> I would also like to really think things through before this is added, like
> if it is a library thing or if we should design the whole thing in the client
> side...

I'm thinking, if such a state-saving feature were added, that it should probably allow picking and choosing of the state that is actually saved. For example, I (obviously) want to see cookie-state be savable; however some of the stuff I use curl for actually skips several of the "clicks" that a browser would do, so in those cases I would not want the referer being kept around. The example I'm thinking of is where you have to run a "login" page to set a session id, and then you need to run a different page that would be 3 clicks away in a web browser in order to get the data you need.

Thanks for considering!
--Kevin
Received on 2000-10-25