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=479b2881600973a86055e429e4f2cbdcd8d81f6c;hp=fd814dbcd746b874f119a4fa2be9595cb69fad44;hb=5eccd0086a4649789d8210c050e34d041cbc3115;hpb=0850f14b361b7473a299fe05b1dc70fe56fecdbd diff --git a/FastMmap.pm b/FastMmap.pm index fd814db..479b288 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.11'; __PACKAGE__->mk_classdata('_session'); __PACKAGE__->mk_accessors('sessionid'); @@ -53,7 +53,12 @@ sub finalize { if ( my $cookie = $c->request->cookies->{session} ) { $set = 0 if $cookie->value eq $sid; } - $c->response->cookies->{session} = { value => $sid } if $set; + if ( $set ) { + $c->response->cookies->{session} = { + value => $sid, + expires => $c->config->{session}->{expires} . 's' + }; + } if ( $c->config->{session}->{rewrite} ) { my $finder = URI::Find->new( sub {