in reply to CGI::Session appears to be overwriting itself

Could it be that the cookie is not stored on the client yet because your script on the server hasn't finished sending the html-page? So when the script asks for the cookie on the second CGI::Session call the client doesn't know the cookie yet and a new session is created

  • Comment on Re: CGI::Session appears to be overwriting itself

Replies are listed 'Best First'.
Re^2: CGI::Session appears to be overwriting itself
by Anonymous Monk on Feb 17, 2009 at 02:42 UTC
    No, cookie set via http headers get set immediately (I've never seen a http client do different).
Re^2: CGI::Session appears to be overwriting itself
by bradcathey (Prior) on Feb 17, 2009 at 02:24 UTC

    Thought of this being the issue, but I thought this stored the cookie:

    print $session->header();

    Yes? No? Thanks.

    Update: I stopped the process after write_session() and I did have a cookie written (according to the cookies dialog in Firefox). But whe allowed to proceed to the check_session a new cookie and session are written.

    —Brad
    "The important work of moving the world forward does not wait to be done by perfect men." George Eliot