|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2020-10-09 14:34 UTC] cmb@php.net
-Summary: setcookie() is not RFC 6265 compliant
+Summary: setcookie() is not fully RFC 6265 compliant
-Status: Open
+Status: Verified
-Assigned To:
+Assigned To: cmb
[2020-10-09 14:34 UTC] cmb@php.net
[2020-10-09 14:36 UTC] phpdocbot@php.net
[2020-10-09 14:36 UTC] phpdocbot@php.net
-Status: Verified
+Status: Closed
[2020-10-10 08:20 UTC] phpdocbot@php.net
[2020-12-30 11:58 UTC] nikic@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Dec 22 17:00:02 2025 UTC |
Description: ------------ According to the documentation the setcookie() implements RFC 6265.According to this RFC the cookie name is a 'token'. The 'token' is defined in RFC 2616. According to RFC 2616 a token is: token = 1*<any CHAR except CTLs or separators> separators = "(" | ")" | "<" | ">" | "@" | "," | ";" | ":" | "\" | <"> | "/" | "[" | "]" | "?" | "=" | "{" | "}" | SP | HT As a consequence statements like "setcookie("cookie[three]", "cookiethree");" are not compliant with RFC 2616. Above statement is from the setcookie() documentation: Example #3 setcookie() and arrays Expected result: ---------------- Easy way out would be to add a note to the documentation that the use of '[' and ']' is not compliant with RFC 6265.