Skip Menu |

This queue is for tickets about the CGI-Session CPAN distribution.

Report information
The Basics
Id: 51192
Status: resolved
Priority: 0/
Queue: CGI-Session

People
Owner: MARKSTOS [...] cpan.org
Requestors: rpv [...] nikolas.ru
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: _SESSION_EXPIRE_LIST created for every session, wasting space [patch]
Date: Sun, 8 Nov 2009 00:29:14 +0600
To: bug-CGI-Session [...] rt.cpan.org
From: "Pavel V. Rochnyack" <rpv [...] nikolas.ru>
Hi all! Because of absent check, load() creates _SESSION_EXPIRE_LIST key for each session data. I assume that it is incorrect behavior. --- CGI/Session.pm.orig<--->2009-03-21 07:59:06.000000000 +0600 +++ CGI/Session.pm<>2009-11-08 00:19:21.000000000 +0600 @@ -757,10 +759,12 @@ . # checking expiration tickers of individuals parameters, if any: my @expired_params = (); - while (my ($param, $max_exp_interval) = each %{ $self->{_DATA}->{_SESSION_EXPIRE_LIST} } ) { + if ( $self->{_DATA}->{_SESSION_EXPIRE_LIST} ) { + while (my ($param, $max_exp_interval) = each %{ $self->{_DATA}->{_SESSION_EXPIRE_LIST} } ) { if ( ($self->{_DATA}->{_SESSION_ATIME} + $max_exp_interval) <= time() ) { push @expired_params, $param; } + } } $self->clear(\@expired_params) if @expired_params; -- Best regards, Pavel V. Rochnyack mailto:rpv@nikolas.ru
Thanks for the patch. It has been applied and will appear in the next release.