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=c9c8113aaa2ad72ac7647bc5d21967a8bf0fb055;hp=e9ae6ceb1e20156830e260c8c5f31399215d12b0;hb=58c05d1a5d313dbe4f225efa72bf74d8df548c2e;hpb=617a86d64440ced92e5d0d938440d8eb555c3505 diff --git a/FastMmap.pm b/FastMmap.pm index e9ae6ce..c9c8113 100644 --- a/FastMmap.pm +++ b/FastMmap.pm @@ -46,16 +46,18 @@ sub finalize { $set = 0 if $cookie->value eq $sid; } $c->response->cookies->{session} = { value => $sid } if $set; - my $finder = URI::Find->new( - sub { - my ( $uri, $orig ) = @_; - my $base = $c->request->base; - return $orig unless $orig =~ /^$base/; - return $orig if $uri->path =~ /\/-\//; - return $c->uri($orig); - } - ); - $finder->find( \$c->res->{output} ) if $c->res->output; + unless ($c->config->{no_url_rewrite}) { + my $finder = URI::Find->new( + sub { + my ( $uri, $orig ) = @_; + my $base = $c->request->base; + return $orig unless $orig =~ /^$base/; + return $orig if $uri->path =~ /\/-\//; + return $c->uri($orig); + } + ); + $finder->find( \$c->res->{output} ) if $c->res->output; + } } return $c->NEXT::finalize(@_); } @@ -145,9 +147,35 @@ sub uri { return $uri; } +=head2 CONFIG OPTIONS + +=head3 no_url_rewrite + +To disable automatic storing of sessions in the url, +you can disable the url rewriting for session by setting +this to a true value. + +=head3 cache_root + +The root directory for the session cache. defaults to a +tempdir. + +=head3 default_expires_in + +how many seconds until the session expires. defaults to 1 day + +=head3 auto_purge_interval + +How often should the system purge sessions. Defaults to 1 time +per day. + +=head auto_purge_on_set + +Is auto purge enabled? defaults to true. + =head1 SEE ALSO -L. +L L. =head1 AUTHOR