Re: Bug #23955: Cookie Max-Age attribute

From: Date: Fri, 28 Dec 2012 16:15:14 +0000
Subject: Re: Bug #23955: Cookie Max-Age attribute
References: 1 2 3 4 5 6  Groups: php.internals 
Request: Send a blank email to internals+get-64458@lists.php.net to get a copy of this message
It is briefly noted in the RFC (mine, not 6265) that negative values and 0 have the same effect. It's practically irrelevant which one is sent. My original commit actually did checks for negative values and sent zeros instead of them, but then somebody on github pointed out that they are legal, so I removed that logic. If not anything else, it saves a few lines of code. - Andrey Quoting Stas Malyshev <smalyshev@sugarcrm.com>:
Hi!
"Max-Age" would simply be added to all Set-Cookie headers, after the "Expires" attribute. I thought that was obvious, but I'll make sure to add a few examples to make it clearer.
I think it makes sense, only note is that it makes no sense to set Max-Age to any negative number, especially as RFC 6265 treats all negative values and 0 as the same: If delta-seconds is less than or equal to zero (0), let expiry-time be the earliest representable date and time. Otherwise, let the expiry-time be the current date and time plus delta-seconds seconds.


« previous php.internals (#64458) next »