Doc #80209 [Ver->Csd]: setcookie() is not fully RFC 6265 compliant

From: Date: Fri, 09 Oct 2020 14:36:11 +0000
Subject: Doc #80209 [Ver->Csd]: setcookie() is not fully RFC 6265 compliant
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-17982@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=80209&edit=1 ID: 80209 Updated by: phpdocbot@php.net Reported by: jve at woodwing dot com Summary: setcookie() is not fully RFC 6265 compliant -Status: Verified +Status: Closed Type: Documentation Problem Package: HTTP related PHP Version: 7.3.23 Assigned To: cmb Block user comment: N Private report: N New Comment: Automatic comment on behalf of cmb Revision: http://git.php.net/?p=doc/en.git;a=commit;h=83f2f6fa3af313b9d5401e7dc9be7031ca141019 Log: Fix #80209: setcookie() is not fully RFC 6265 compliant Previous Comments: ------------------------------------------------------------------------ [2020-10-09 14:34:16] cmb@php.net Thanks for forwading to the bug tracker. :) ------------------------------------------------------------------------ [2020-10-09 12:58:10] jve at woodwing dot com 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. ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=80209&edit=1

« previous php.doc.bugs (#17982) next »