]> granicus.if.org Git - php/commit
Streamlining of cookie handling in ext/session and setcookie
authorMartin Jansen <martin@divbyzero.net>
Tue, 6 May 2014 20:00:59 +0000 (22:00 +0200)
committerMartin Jansen <martin@divbyzero.net>
Tue, 6 May 2014 20:00:59 +0000 (22:00 +0200)
commitc5f9a231d5adc8cf8ab9890f0acc27206495a080
treeba58a8f801eed97876e695eaeb948048f76f8ba6
parentc0f4e270a8e7c78b780fc3872f05758d16e522ef
Streamlining of cookie handling in ext/session and setcookie

Up until now the session cookie used "HttpOnly" to indicate cookies
only available through HTTP while setcookie() used "httponly".  The
relevant RFC 6265 claims that case does not matter for this token,
but only explicitely mentions "HttpOnly".  Thus this seems like a
logical choice when streamlining the code.

Also the setcookie implementation now uses the same string constants
as the session extension for other tokens like Max-Age or the domain
attribute.

This change poses a slight risk of backwards incompatibility in places
where people deliberately ignore chapter 5.2.5 of RFC 6265 and perform
case-sensitive checks for the HttpOnly attribute.
ext/session/session.c
ext/standard/head.c
ext/standard/head.h
ext/standard/tests/network/setcookie.phpt