Skip to content

Commit

Permalink
Fix duplicate cookies (#112)
Browse files Browse the repository at this point in the history
After merging the headers, make sure that the native session cookie is restored.
  • Loading branch information
mathieudz authored and andig committed Jun 10, 2018
1 parent 9aeeb26 commit 691c29e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Bridges/HttpKernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -276,8 +276,8 @@ protected function mapResponse(SymfonyResponse $syResponse, $stdout='')
$cookies[] = $cookieHeader;
}

if (isset($headers['Set-Cookie'])) {
$headers['Set-Cookie'] = array_merge((array)$headers['Set-Cookie'], $cookies);
if (isset($nativeHeaders['Set-Cookie'])) {
$headers['Set-Cookie'] = array_merge((array)$nativeHeaders['Set-Cookie'], $cookies);
} else {
$headers['Set-Cookie'] = $cookies;
}
Expand Down

0 comments on commit 691c29e

Please sign in to comment.