cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: Cookie problem with POST/HTTPS connection

From: Ralph Mitchell <rmitchell_at_eds.com>
Date: Thu, 11 Mar 2004 09:26:09 -0600

> yes, you are correct in your understanding.

That was partly to try jump-starting other folks who may have had
similar experiences...

> thanks for making me take another look at this. from looking at the
> headers and my browsers cookies it seems the session id is not being
> set. the id i am given specifies a path, which may be the problem.
> obviously the path of the server and the location i am in on my local
> server do not correspond. would this stop the browser from setting the
> cookie? also, as i am posting to https, a secure connection is being
> made. i notice on my local box, after using curl, a secure connection
> has not been made. the cookie may be being defined as one that needs
> https.
>
> i've tried a quick fopen/setcookie to read from the cookier jar
> file and
> reset the path, "/", but from my understanding of php that cookie wont
> be available in the current session. tests seem to prove this.
>
> is there a way to change the cookie held in the cookie jar, to
> reset the
> path, so that when cookiefile is called, to read and set cookies, it
> does what i need it to do?

I'm not any kind of expert with cookies, and haven't ever tried curl
inside php, but... What I was thinking was that when your script hands
the page it stole over to your browser, it needs to first extract the
cookies from the file, fix up the paths in them, then hand them off to
your browser. *Then* it should send the page. Or something like
that. You need to make sure your browser gets the cookie set that
matches the page.

I'm now just about out of ideas... I've never had to worry about
cookies, except to watch them whooshing back and forth. I'm happy to
keep discussing it in the hopes that we shake something loose, but you
may have reached the point where you need to dig up a real live
curl/php & cookie expert.

Ralph
Received on 2004-03-11