X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Plugin-Session-State-Cookie.git;a=blobdiff_plain;f=FastMmap.pm;h=0373ffff15a54c4f4ed7b7a3648b922c2d09bc35;hp=c81362859c9742340aba59d0b59e58dfb5730f90;hb=c43906010576e857905834db1f840972e4f3531c;hpb=5e0e17c813151faedeba3c02525db6733ee051e7 diff --git a/FastMmap.pm b/FastMmap.pm index c813628..0373fff 100644 --- a/FastMmap.pm +++ b/FastMmap.pm @@ -9,7 +9,7 @@ use URI; use URI::Find; use File::Temp 'tempdir'; -our $VERSION = '0.09'; +our $VERSION = '0.13'; __PACKAGE__->mk_classdata('_session'); __PACKAGE__->mk_accessors('sessionid'); @@ -53,11 +53,11 @@ sub finalize { if ( my $cookie = $c->request->cookies->{session} ) { $set = 0 if $cookie->value eq $sid; } - $c->response->cookies->{session} = { - value => $sid, - expires => "+" . $self->config->{session}->{expires} . "s" - } - if $set; + if ( $set ) { + $c->response->cookies->{session} = { + value => $sid + }; + } if ( $c->config->{session}->{rewrite} ) { my $finder = URI::Find->new( sub {