PHP $_COOKIE is not entirely populated PHP $_COOKIE is not entirely populated laravel laravel

PHP $_COOKIE is not entirely populated


Congrats, you found a PHP bug; I've just reported it.

You can't do anything about it now, except waiting for a fix.

As I noted inside the bug report, the cause really is that the headers are so large, thus the browser splitting it up into multiple TCP packets… and the HTTP parser in sapi/cli/php_http_parser.c currently does not seem to back up the buffer with the header value in case it needs to wait for the next packet and merging it with the next packet later. Hence, it ends up to be truncated.

As code tells sometimes more than text: a simple reproduce case: http://git.php.net/?p=php-src.git;a=commitdiff;h=37d814b84cff3678a2e1d56ea9d3ba3c35082e13