From:             kruemelmonster at cookiecan dot de
Operating system: 
PHP version:      4.3.2
PHP Bug Type:     Feature/Change Request
Bug description:  setcookie(): max-age needed [to comply with rfc]


based on the discussion in #23835, I file here that the function
setcookie() should include the missing paramenter 'max-age'.

max-age is defined in:
http://www.ietf.org/rfc/rfc2109.txt
http://www.ietf.org/rfc/rfc2965.txt 
which both are referenced in the documentation of the setcookie() - func
itself.

max-age has become more and more important, because it removes the
timezone-issue from the former way of timestamping cookie expiration
dates.


thanks for considering. 

-----

here's some detail taken from the rfc-specs:


Max-Age=value

  OPTIONAL.  The value of the Max-Age attribute is delta-seconds, the
lifetime of the cookie in seconds, a decimal non-negative integer.  To
handle cached cookies correctly, a client SHOULD calculate the age of the
cookie according to the age calculation rules in the HTTP/1.1
specification [RFC2616].  When the age is greater than delta-seconds
seconds, the client SHOULD discard the       cookie.  A value of zero
means the cookie SHOULD be discarded immediately.



-- 
Edit bug report at http://bugs.php.net/?id=23955&edit=1
-- 
Try a CVS snapshot:         http://bugs.php.net/fix.php?id=23955&r=trysnapshot
Fixed in CVS:               http://bugs.php.net/fix.php?id=23955&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=23955&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=23955&r=needtrace
Try newer version:          http://bugs.php.net/fix.php?id=23955&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=23955&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=23955&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=23955&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=23955&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=23955&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=23955&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=23955&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=23955&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=23955&r=gnused

Reply via email to