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 <smalys...@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.



--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to