Re: cvs: php-src / NEWS /main php_variables.c
| From: | Ilia Alshanetsky | Date: | Mon, 18 Jul 2005 12:51:00 +0000 |
| Subject: | Re: cvs: php-src / NEWS /main php_variables.c | ||
| References: | 1 2 | Groups: | php.cvs |
| Request: | Send a blank email to php-cvs+get-32957@lists.php.net to get a copy of this message | ||
The Cookie RFC (2109) clearly states that spaces are permitted between tokens and that a comma is a valid separator. PHP's own setcookie() function will refuse to create cookies containing spaces or commas in their names. At the same time, while uncommon it is perfectly valid to have multiple Cookie: headers within the response, something on which PHP currently badly breaks.
Ex.
Cookie: testA=1, testB=2
_COOKIE['testA'] = '1, testB=2';
Ilia
Stefan Esser wrote:
This patch breaks Backward Compatibility. Multiple COOKIE headers are uncommon. Unencoded ',' are common in cookies. F.e. all Falk AG adsites use them. We already reverted this patch when Jani commited it some weeks ago. Stefancase PARSE_COOKIE: - separator = ";\0"; + /* The , and space are needed for instances when there are multiple Cookie: headers */ + separator = ";, \0"; break; }