You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is a bug in method filterResponse() of Symfony\Component\HttpKernel\Client.php.
There is in line 172:
$headers['Set-Cookie'] = implode(', ', $cookies);
and probably should be:
$headers['Set-Cookie'] = $cookies;
How to reproduce bug:
Set one than more cookie in action (in my case this is onAuthenticationSuccess method in login success handler):
public function onAuthenticationSuccess(Request $request, TokenInterface $token)
{
...
$response->headers->setCookie(new \Symfony\Component\HttpFoundation\Cookie('cookie1', base64_encode('value1'), time() + (3600 * 48), '/', '', false, false));
$response->headers->setCookie(new \Symfony\Component\HttpFoundation\Cookie('cookie2', base64_encode('value2'), time() + (3600 * 48), '/', '', false, false));
return $response;
}
Then you should receive exception during unittesting:
InvalidArgumentException: Could not parse date "Fri, 16 Dec 2011 14:06:26 GMT,cookie2=dmFsdWUy".
The text was updated successfully, but these errors were encountered:
There is a bug in method filterResponse() of Symfony\Component\HttpKernel\Client.php.
There is in line 172:
$headers['Set-Cookie'] = implode(', ', $cookies);
and probably should be:
$headers['Set-Cookie'] = $cookies;
How to reproduce bug:
Set one than more cookie in action (in my case this is onAuthenticationSuccess method in login success handler):
public function onAuthenticationSuccess(Request $request, TokenInterface $token)
{
...
$response->headers->setCookie(new \Symfony\Component\HttpFoundation\Cookie('cookie1', base64_encode('value1'), time() + (3600 * 48), '/', '', false, false));
$response->headers->setCookie(new \Symfony\Component\HttpFoundation\Cookie('cookie2', base64_encode('value2'), time() + (3600 * 48), '/', '', false, false));
return $response;
}
Then you should receive exception during unittesting:
InvalidArgumentException: Could not parse date "Fri, 16 Dec 2011 14:06:26 GMT,cookie2=dmFsdWUy".
The text was updated successfully, but these errors were encountered: