|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2014-11-10 10:52 UTC] aharvey@php.net
-Status: Open
+Status: Duplicate
[2014-11-10 10:52 UTC] aharvey@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Dec 13 00:00:02 2025 UTC |
Description: ------------ The last Set-Cookie header, setting a cookie by the same name, always overrides the data in the browser, but multiple set-cookie headers are send for the same name. This initially caused our proxy server to reject the response, because the header size exceeded the default limit. setcookie() should override previous calls to the same cookie name. It should also issue an E_NOTICE message when overriding a previously called cookie, for easier tracing of problems where a cookie might wrongly be overridden. Test script: --------------- <?php setcookie('randomcookie','olddata'); setcookie('randomcookie','newdata'); Expected result: ---------------- In the response headers as suggested: Set-Cookie:randomcookie=newdata Actual result: -------------- In the response headers as it is now: Set-Cookie:randomcookie=olddata Set-Cookie:randomcookie=newdata