Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the CGI CPAN distribution.

Report information
The Basics
Id: 21533
Status: resolved
Priority: 0/
Queue: CGI

Owner: LDS [...]
Requestors: webmaster [...]

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

CC: webmaster [...]
Subject: CGI/
Date: Sun, 17 Sep 2006 14:46:05 +0800
To: [...]
From: Chan Bernard Ki Hong <webmaster [...]> (and thus CGI::Cookie) does not seem to handle decimal relative time for "-expires" properly, but the code in CGI/ makes me think the original intent was to support it. CGI/ - version 1.5. - version 3.15. Perl: This is perl, v5.8.8 built for i486-linux-gnu-thread-multi uname: Linux #4 PREEMPT Tue May 30 20:35:53 HKT 2006 i686 GNU/Linux #!/usr/bin/perl -w use CGI; my $cgi = new CGI; print $cgi->header( -type => 'text/html', -cookie => [ $cgi->cookie( -name => 'one', -value => 'one', -expires => '+1h', ), $cgi->cookie( -name => 'two', -value => 'two', -expires => '+2.5h', # BUG ), ], ); OUTPUT: Set-Cookie: one=one; path=/; expires=Sun, 17-Sep-2006 07:45:18 GMT Set-Cookie: two=two; path=/; expires=Sun, 17-Sep-2006 06:45:20 GMT The second cookie is created with an earlier expiration time than the first, which is obviously wrong. The attached diff seems to fix it. Thank you. Regards, Bernard Chan.
Download patch.diff
text/x-diff 400b

Message body is not shown because sender requested not to inline it.

Patch accepted. Thanks!

This service is sponsored and maintained by Best Practical Solutions and runs on infrastructure.

Please report any issues with to