cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: -b/--cookie option giving seg fault's

From: Daniel Stenberg <Daniel.Stenberg_at_haxx.nu>
Date: Tue, 22 Feb 2000 08:24:50 +0100

Thomas Levitt wrote:

> The file was blank.. from what i understood from the curl man page, if you
> specified a string without an '=' with the -b option, it would either read
> from or write to the filename specified depending on the action needed (me
> reciving a cookie, or the server requesting one back).. hopfully this is
> correct..

You're not the first one to believe this, so I don't blame you. I blame
the author of that docs! :-)

-b only reads from a file. To store the cookies from a session, just store
the normal headers with -D. -b is also capable of reading a netscape
cookie file.

> but anyways.. more specificly, this is what i was hopeing to do with curl.
> 1) connect to a https server and POST some data to it... in return the
> server would send me a cookie with a session id number, and anohter cookie
> storing one of the fields in the POST i did.. 2) reconnect to the same https
> server and POST some more data to it.. but now each time i connect, the
> server will request the session id cookie, and the other coookie...
>
> i was able to use curl with the -b option if i manualy entered in the
> cookie's that i needed to send to the server.. but.. that kinda wrecks the
> idea of automating the task if i have to do it manualy..

You should be able to do this by first using -D and in the second invoke
use -b on the same file.

I am of course more interested in why curl crashes. Would you be able to
run a debugger on it and get a stack trace when it dumps?

--
   Daniel Stenberg - http://www.contactor.se/~dast - +46-705-44 31 77
   ech`echo xiun|tr nu oc|sed 'sx\([sx]\)\([xoi]\)xo un\2\1 is xg'`ol
Received on 2000-02-22