cURL / Mailing Lists / curl-library / Single Mail

curl-library

setting cookies before curl_easy_peform() doesn't seem to work for me.

From: Derek Ealy <dealy663_at_hotmail.com>
Date: Fri, 28 Mar 2003 09:33:31 -0800

I'm developing a CGI in which I am using libCurl to access another URL. I
need to pass along the cookies (session IDs and such) to this URL I am
accessing w/libCurl. The problem is though that they don't appear to be
passed along, meaning that the servlets on the other side aren't seeing
these cookies that were set when my CGI was called.

I'm using something along these lines:

...
curl_easy_setopt(curl_handle, CURLOPT_URL, "https://xx.com/servlet");
string cookies = "ONTCred=1235;JSESSIONID=abc123";
curl_easy_setopt(curl_handle, CURLOPT_COOKIE, cookies.c_str());
...
curl_easy_perform(curl_handle);

curl_easy_perform() returns 0, but like I said it is as if the cookies never
arrive. Obviously I've misunderstood how to do this? Any ideas?

Thanks, Derek

_________________________________________________________________
The new MSN 8: advanced junk mail protection and 2 months FREE*
http://join.msn.com/?page=features/junkmail

-------------------------------------------------------
This SF.net email is sponsored by:
The Definitive IT and Networking Event. Be There!
NetWorld+Interop Las Vegas 2003 -- Register today!
http://ads.sourceforge.net/cgi-bin/redirect.pl?keyn0001en
Received on 2003-03-28