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:
case PARSE_COOKIE:
- separator = ";\0";
+ /* The , and space are needed for instances when there
are multiple Cookie: headers */
+ separator = ";, \0";
break;
}
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.
Stefan
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php