cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: Login and uploading in one session

From: Daniel Stenberg <daniel-curl_at_haxx.se>
Date: Thu, 31 Mar 2005 01:02:16 +0200 (CEST)

On Thu, 31 Mar 2005, Matti Leino wrote:

> Thanks you from your answer, and yes, you're right, I could do it that way.
> But I was thinking, since for security reasons, session_id must be always
> same, I mean that when you go to login page, you start new session and post
> that session id in hidden form field. But if I close this first connection
> and open new connection, old session is destroyed and session_id has
> changed, and I have to login again. So that's the reason why I was thinking
> a way to do this.

I think you're confusing terms here. The 'session_id' variable is likely to
just identify a session on the server-side. HTTP is stateless so the server
side doesn't care if you close the (TCP) connection to it between requests.

If you get the session_id first, then wait another 5 minutes before you send
off another curl command line using the extracted session_id, it will simply
look like the same session to the server. If only with a pretty slow user.

-- 
      Daniel Stenberg -- http://curl.haxx.se -- http://daniel.haxx.se
  Commercial curl and libcurl Technical Support: http://haxx.se/curl.html
Received on 2005-03-31