curl-users
Re: Behavior of -D and -c options in curl
Date: Tue, 16 Jan 2007 06:35:03 -0800 (PST)
Are you referring to the need to use -b (or -c) to activate cookie parsing on
incoming headers? That was always the case and curl has never parsed cookies
without you telling it to.
-----yes,
A small modification to my question:
Does -D dumps cookies for each URL or at the end of handling all the URLs?
What is the behavior of -c when writing cookies?
curl -L -c "hello" http://foo.bar.com
Suppose the above command follows 3 URLs seeing Location in header.
I need a timeline status of the contents of "hello" file after each URL is followed.
Are the cookies written as the URL is followed , or they are put to the cookie keeper and written at the end.
Similarly the timeline status of the contents "hello" file after the above command with a -D. Here I am interested in cookies only, not headers.
curl -L -D "hello" http://foo.bar.com
thanks,
Imran
Daniel Stenberg <daniel_at_haxx.se> wrote: On Tue, 16 Jan 2007, imran shaik wrote:
> I see that the older versions(7.9.8 the oldest one I have) of curl read from
> the headers file without -b .
Uhm, I think I don't understand. curl has never read from any headers file
without you telling it to.
> But the newer versions(7.14) do require -b. I observed this in case of 2 or
> 3 redirects.
Are you referring to the need to use -b (or -c) to activate cookie parsing on
incoming headers? That was always the case and curl has never parsed cookies
without you telling it to.
> Am I correct ?
Not if I understand you correctly.
> Can I know what is the additional information stored with -c?
Read the output file, it is in netscape/mozilla/firefox cookie jar format. It
contains for example host/domain and more that the headers do not
(necessarily) contain.
> Is only the additional information that makes -c more preferable than -D
"only" ? -c makes a perfect cookie jar of all existing known cookies
(including those that was read previously with -b), while -D is a "mere"
header dump. That's quite some difference. If managing cookies is your game,
then -c is a must and -D for the laymen. ;-)
> Also, in case of -L does -c forces all the cookies to be written at the end
> of all redirects?
No.
> Does -D dumps for each URL or at the end of handling all the URLs?
-D dumps all headers as they come in. If -L follows 488 redirects, you will
get 488 set of headers dumped to the file.
-- Commercial curl and libcurl Technical Support: http://haxx.se/curl.html --------------------------------- Never miss an email again! Yahoo! Toolbar alerts you the instant new Mail arrives. Check it out.Received on 2007-01-16