[HttpFoundation] don't prefix cookies with "Set-Cookie:"
See symfony/symfony#25393
This commit is contained in:
parent
ecf54d5aa0
commit
a4db20fbfd
@ -156,7 +156,7 @@ abstract class AbstractSessionHandler implements \SessionHandlerInterface, \Sess
|
||||
if ($sessionCookieFound) {
|
||||
header_remove('Set-Cookie');
|
||||
foreach ($otherCookies as $h) {
|
||||
header('Set-Cookie:'.$h, false);
|
||||
header($h, false);
|
||||
}
|
||||
} else {
|
||||
setcookie($this->sessionName, '', 0, ini_get('session.cookie_path'), ini_get('session.cookie_domain'), ini_get('session.cookie_secure'), ini_get('session.cookie_httponly'));
|
||||
|
@ -0,0 +1,24 @@
|
||||
open
|
||||
validateId
|
||||
read
|
||||
doRead: abc|i:123;
|
||||
read
|
||||
updateTimestamp
|
||||
close
|
||||
open
|
||||
validateId
|
||||
read
|
||||
doRead: abc|i:123;
|
||||
read
|
||||
|
||||
write
|
||||
destroy
|
||||
doDestroy
|
||||
close
|
||||
Array
|
||||
(
|
||||
[0] => Content-Type: text/plain; charset=utf-8
|
||||
[1] => Cache-Control: max-age=10800, private, must-revalidate
|
||||
[2] => Set-Cookie: abc=def
|
||||
)
|
||||
shutdown
|
@ -0,0 +1,13 @@
|
||||
<?php
|
||||
|
||||
require __DIR__.'/common.inc';
|
||||
|
||||
setcookie('abc', 'def');
|
||||
|
||||
session_set_save_handler(new TestSessionHandler('abc|i:123;'), false);
|
||||
session_start();
|
||||
session_write_close();
|
||||
session_start();
|
||||
|
||||
$_SESSION['abc'] = 234;
|
||||
unset($_SESSION['abc']);
|
Reference in New Issue
Block a user