cURL / Mailing Lists / curl-library / Single Mail


libcurl problem

From: Kamieniecki, Darcy <>
Date: Wed, 29 Jan 2003 13:44:56 -0700

I am having troubles using java and libcurl v7.9.5 to get a web page for me.

I can successfully connect to my remote site and download the info.csv page
using the following curl command line:

curl -s --cert pemfile.pem -d user=<user>
-d pswd=<password> -d login=Submit

Here's my java code:

                cg.setopt(CurlGlue.CURLOPT_SSLVERSION, 3);
                cg.setopt(CurlGlue.CURLOPT_VERBOSE, 1);
                cg.setopt(CurlGlue.CURLOPT_FOLLOWLOCATION, 1);
                cg.setopt(CurlGlue.CURLOPT_POST, 1);
                cg.setopt(CurlGlue.CURLOPT_SSLCERT, "./pemfile.pem");
                cg.setopt(CurlGlue.CURLOPT_COOKIEJAR, "cookie.txt");
                cg.perform(); // FIRST PAGE - login

                //MANUAL SET COOKIE TEST cg.setopt(CurlGlue.CURLOPT_COOKIE,
                cg.perform(); // SECOND PAGE - validate user

                cg.perform(); // THIRD PAGE - get info

For whatever reason, it doesn't look like the session id generated by the
first page request is used by the second page request. If I manually set the
session id, it works fine.

I would appreciate any help,
Thanks in advance,
Darcy Kamieniecki

This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
Received on 2003-01-29