cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: Cookie problem with POST/HTTPS connection

From: Daniel Stenberg <daniel-curl_at_haxx.se>
Date: Wed, 10 Mar 2004 16:28:57 +0100 (CET)

On Wed, 10 Mar 2004, Paul Forsyth wrote:

> When you first load it a cookie is set. The error you see is expected
> because normally POST information is sent. If you reload the screen you get
> a server error. From my tests, this is because it matches the cookie on your
> machine with something it expects, and fails. Its hard to see this just on
> this example, but when i send real data to it via the browser, and use
> liveheaders to track, i see new cookies, for the same variable, being set on
> each return from the system.
>
> If curl isn't able to move the user to the POST location, like a browser
> does, is there a way to mimick this? How does a browser do this?

I think you need to remember that curl works as a client and it talks to a
server.

When you use a browser to view a PHP page that uses curl, that server is then
acting as a client when talking to the remote server.

[A - browser] => [B - PHP as a client using curl] => [C - remote server]

So, the advice we brought you earlier was how to make B <=> C work. You do
that by making sure you load and store cookies on each request.

You seem to talk about the A <=> B communication in this reply, and that is
really not a curl issue. That is a fun issue for you to work out!

-- 
    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-10