Cees Hek wrote:
On 6/16/06, RA Jones <[EMAIL PROTECTED]> wrote:
Presumably this is not the correct way to handle new session id
generation in CGI::Session. Is it even possible to force CGI::Session to
use a pre-defined session id string in the first place?

If CGI::Session can not load a session from the ID given, it throws it
away and creates a new one (at least that is the way it looks from the
source code).  I am not sure why that is done, but that is the way it
currently works.

One way around this may be to write your own custom ID generator for
CGI::Session, and have it look for an existing session ID somewhere
and use that, or failing that generate the ID in the usual way.
Having had a quick play around with various options outlined in the CGI::Session docs, the following arrangement seems to do what I wanted:

CGI_SESSION_OPTIONS => [ "driver:mysql;id:static", $session_id || $cgi, { Handle => $dbh } ]

The application seems to work OK on first *and* subsequent invocations, with or without the $cgi 'or' option, even though the $session_id param only exists on first hand-over from the referring app. But still, it works :-)

***************************************************************************
This e-mail is confidential and privileged. If you are not the intended
recipient please accept our apologies; please do not disclose, copy or
distribute information in this e-mail or take any action in reliance on its
contents: to do so is strictly prohibited and may be unlawful. Please
inform us that this message has gone astray before deleting it. Thank you
for your co-operation.
***************************************************************************


---------------------------------------------------------------------
Web Archive:  http://www.mail-archive.com/[email protected]/
             http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to