curl-library
RE: authentication and cookie
Date: Wed, 17 Mar 2004 14:54:10 +0100 (CET)
On Thu, 18 Mar 2004, Yoav Schreiber wrote:
> Are the original cookies kept in the second request (the request that
> include the user and password)?
If you active the "cookie engine" in libcurl (which both CURLOPT_COOKIEFILE
and CURLOPT_COOKIEJAR do), it will automaticly update the cookies when it
receives new contents from the server. Just as your browser does.
> Are you calling curl_easy_perform() twice?
If you first need to fetch a patch to get the initial cookie, and then do the
actual login, I'd say it sounds like it takes two calls to *perform().
> Do I have to call other curl api for making it happen?
I'd recommend you to read the "Cookies Without Chocolate Chips" chapter in
libcurl-the-guide. Docs actually can help at times! ;-)
-- Daniel Stenberg -- http://curl.haxx.se/ -- http://daniel.haxx.se/ [[ Do not send mails to this email address. They won't reach me. ]]Received on 2004-03-17