cURL / Mailing Lists / curl-users / Single Mail


RE: How using multiple files headers (for cookies)

From: Roth, Kevin P. <>
Date: Tue, 15 Jan 2002 10:28:44 -0500

Sounds like a job for the new cookie jar feature...

curl -c cky_jar URL1
curl -c cky_jar URL2
curl -c cky_jar URL3


-----Original Message-----
From: Daniel Stenberg []
Sent: Tuesday, January 15, 2002 7:31 AM
To: I_ P_
Cc: Curl Mailinglist
Subject: Re: How using multiple files headers (for cookies)

On Tue, 15 Jan 2002, I_ P_ wrote:

> I execute two curl command (1,2) to get the headers in http (option
> The third curl command (3) use 2 cookies that is creating in 1 and 2
> command. Which is the option for curl to use these 2 headers? In curl
> command 3 I need also a new cookie,that is setting in javascript(I
know the
> name and value because I saw it the javascript code). How can I set in
> command a new cookie?

The -b option that takes a file with cookies can (currently) only be
once on the command line, so if you don't wanna concatenate both files
into a
third using:

$ cat file1 file2 > file3
$ curl -b file3 [URL]

You also have the option to tell curl to get the -b file from stdin like

$ cat file1 file2 | curl -b @- [URL]

And to add your own custom cookie, that is added with "-b
or if you wanna set several cookies "-b var1=cont1;var2=cont2;".

    Daniel Stenberg -- curl groks URLs --
Received on 2002-01-15