Session/Http, rework getCookies logic so that empty hash is returned if there's no

request object.  That way a sessionId gets created back in Session::Var::start.

Session.pm: pass Session::DateTime->new a session object instead of self

Session/DateTime.pm:  Added a space.  Note that this is infinite recursion since
it calls itself.
This commit is contained in:
Colin Kuskie 2006-01-14 18:58:30 +00:00
parent 6dfa55d423
commit 84e20a1a96
3 changed files with 8 additions and 3 deletions

View file

@ -63,7 +63,12 @@ Retrieves the cookies from the HTTP header and returns a hash reference containi
sub getCookies {
my $self = shift;
return APR::Request::Apache2->handle($self->session->request)->jar();
if ($self->session->request) {
return APR::Request::Apache2->handle($self->session->request)->jar();
}
else {
return {};
}
}