cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: Cookie awareness (was: curl win32 commandline question)

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Sat, 17 Mar 2001 19:25:08 +0100 (MET)

On Fri, 16 Mar 2001, Kevin P Roth wrote:

> Here's a followup question regarding cookie awareness: with the new
> options in place for requesting multiple URLs in the same call to curl,
> will cookie-awareness continue to work? Does it change in any way?

I haven't really thought about it, but since I find your question relevant I
checked how it works right now.

The current "cookie awareness" stores the cookie data in the main data
struct, which means the cookies are remembered between each connection and
yes, your scenario with a lot of requests on the same command line _should_
work since they all store and fetch cookies in the same area.

This should also work in 7.7 (then even with persistant connections).

> In this particular example, #2-4 are all on the same server, while #1 is
> on a different machine. With the new ability to submit multiple urls at
> the same time, I'd envision changing this so it only needs one call to
> curl with the four URLs at once.

I can't see any reason why it wouldn't work!

> But it would still need to hit the four pages in the same order, and it
> would still need to track and send the cookies to each subsequent URL.

Curl, or libcurl, never change the order of the given URLs. They'll be
downloaded in the given order and when the 'cookie awarenes' is enabled, curl
will record received cookies and send cookies it has recorded that fit
requests it is about to perform.

-- 
  Daniel Stenberg -- curl project maintainer -- http://curl.haxx.se/
Received on 2001-03-17