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

Report information
The Basics
Id:
18493
Status:
resolved
Priority:
Low/Low
Queue:

People
Owner:
Nobody in particular
Requestors:
m-uchino [...] yetipapa.com
Cc:
AdminCc:

BugTracker
Severity:
(no value)
Broken in:
(no value)
Fixed in:
(no value)



Subject: header() method
HTTP Header which it was outputted by header() method is the following. ex. $session->expire('+5d'); ---------------------------------- Set-Cookie: CGISESSID=...; path=/; expires=432000s ---------------------------------- 'expires' is not date-format. I think, CGI::Cookie should be necessary '+432000s'. (Not '432000s') Sorry, my English is poor.
From: Nobuaki ITO
That may be because of a bug in sub cookie() (around ver. 4.00). Following patch might work; --- Session.pm 2006-04-12 11:44:44.000000000 +0900 +++ Session.pm.new 2006-04-12 11:45:04.000000000 +0900 @@ -306,7 +306,7 @@ $cookie = $query->cookie( -name=>$self->name, -value=>$self->id, -expir es=> '-1d', @_ ); } elsif ( my $t = $self->expire ) { - $cookie = $query->cookie( -name=>$self->name, -value=>$self->id, -expir es=> $t . 's', @_ ); + $cookie = $query->cookie( -name=>$self->name, -value=>$self->id, -expir es=> '+' . $t . 's', @_ ); } else { $cookie = $query->cookie( -name=>$self->name, -value=>$self->id, @_ );
Subject: Re: [rt.cpan.org #18493] header() method
Date: Wed, 12 Apr 2006 09:56:46 -0400
To: Guest via RT <bug-CGI-Session@rt.cpan.org>
From: Mark Stosberg <mark@summersault.com>
On Tue, Apr 11, 2006 at 11:07:30PM -0400, Guest via RT wrote:
Show quoted text
> > Queue: CGI-Session > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=18493 > > > That may be because of a bug in sub cookie() (around ver. 4.00). > Following patch might work; > > --- Session.pm 2006-04-12 11:44:44.000000000 +0900 > +++ Session.pm.new 2006-04-12 11:45:04.000000000 +0900 > @@ -306,7 +306,7 @@ > $cookie = $query->cookie( -name=>$self->name, > -value=>$self->id, -expir > es=> '-1d', @_ ); > } > elsif ( my $t = $self->expire ) { > - $cookie = $query->cookie( -name=>$self->name, > -value=>$self->id, -expir > es=> $t . 's', @_ ); > + $cookie = $query->cookie( -name=>$self->name, > -value=>$self->id, -expir > es=> '+' . $t . 's', @_ ); > } > else { > $cookie = $query->cookie( -name=>$self->name, > -value=>$self->id, @_ );
Applied. This will appear in 4.13 shortly. Mark


This service runs on Request Tracker, is sponsored by The Perl Foundation, and maintained by Best Practical Solutions.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.