Skip to content

Commit 691c29e

Browse files
mathieudzandig
authored andcommitted
Fix duplicate cookies (#112)
After merging the headers, make sure that the native session cookie is restored.
1 parent 9aeeb26 commit 691c29e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Bridges/HttpKernel.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -276,8 +276,8 @@ protected function mapResponse(SymfonyResponse $syResponse, $stdout='')
276276
$cookies[] = $cookieHeader;
277277
}
278278

279-
if (isset($headers['Set-Cookie'])) {
280-
$headers['Set-Cookie'] = array_merge((array)$headers['Set-Cookie'], $cookies);
279+
if (isset($nativeHeaders['Set-Cookie'])) {
280+
$headers['Set-Cookie'] = array_merge((array)$nativeHeaders['Set-Cookie'], $cookies);
281281
} else {
282282
$headers['Set-Cookie'] = $cookies;
283283
}

0 commit comments

Comments
 (0)