|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2016-10-19 04:59 UTC] yohgaki@php.net
-Assigned To:
+Assigned To: yohgaki
[2016-10-19 05:27 UTC] yohgaki@php.net
-Status: Assigned
+Status: Not a bug
[2016-10-19 05:27 UTC] yohgaki@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 14:00:01 2025 UTC |
Description: ------------ header() removes previously defined headers when replace flag is false. Test script: --------------- <?php ob_start(); ini_set('session.use_cookies', 1); ini_set('session.save_handler', 'files'); session_name('BUG'); session_start(); // Bug0 session_regenerate_id(true); // Bug2 header(sprintf('Set-Cookie: BUG=BUG2; expires=Sat, 03-Sep-2020 05:38:43 GMT; path=/;', false)); Expected result: ---------------- $ ./sapi/cgi/php-cgi s.php X-Powered-By: PHP/5.6.28-dev Expires: Thu, 19 Nov 1981 08:52:00 GMT Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0 Pragma: no-cache Set-Cookie: BUG=45df8aabbae8b88139fefdc46c2de696; path=/ Set-Cookie: BUG=BUG2; expires=Sat, 03-Sep-2020 05:38:43 GMT; path=/; Content-type: text/html; charset=UTF-8 Actual result: -------------- $ ./sapi/cgi/php-cgi s.php X-Powered-By: PHP/5.6.28-dev Expires: Thu, 19 Nov 1981 08:52:00 GMT Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0 Pragma: no-cache Set-Cookie: BUG=BUG2; expires=Sat, 03-Sep-2020 05:38:43 GMT; path=/; Content-type: text/html; charset=UTF-8