Hi all,

As is Dan Horne (C::A::P::S - new session every call) I'm upgrading some
code, but I'm new to C::A. I haven't yet used HtmlTemplate or TT. At the
moment I'd like to avoid it, if possible? In cgiapp_init I have this:

my $sid = $query->cookie('CGISESSID') || undef;
my $session = new CGI::Session("driver:File", $sid, {Directory=>'/tmp'});
$self->param('session'=>$session);
if (!$sid or $sid ne $session->id) {
  my $cookie = $query->cookie(-name => 'CGISESSID',
                              -value => $session->id,
                              -expires => '+1d');
  $self->header_props(-cookie=>$cookie);
#   print $query->header(-cookie=>$cookie);
}

(Sorry 'bout that. Damn I hate cut & paste from unix to MS!)

After this, start_mode goes on to print a login HTML page on IE using print qq`<html>...
If a cookie isn't already set, Set-Cookie:... is printed (along with Content-type:...)
but the cookie doesn't get set unless I uncomment the above print statement.


I started to use ::Plugin::Session but backed off. I was using CGI::Simple but the
same happens with CGI.pm. What am I doing wrong? Is it because I'm using print instead
of templates?


Thanks,
Jon





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