Mercurial > hg > isophonics-drupal-site
diff vendor/symfony/psr-http-message-bridge/Factory/HttpFoundationFactory.php @ 18:af1871eacc83
Update to Drupal core 8.7.1
author | Chris Cannam |
---|---|
date | Thu, 09 May 2019 15:33:08 +0100 |
parents | 129ea1e6d783 |
children |
line wrap: on
line diff
--- a/vendor/symfony/psr-http-message-bridge/Factory/HttpFoundationFactory.php Thu Feb 28 13:21:36 2019 +0000 +++ b/vendor/symfony/psr-http-message-bridge/Factory/HttpFoundationFactory.php Thu May 09 15:33:08 2019 +0100 @@ -140,6 +140,9 @@ */ public function createResponse(ResponseInterface $psrResponse) { + $cookies = $psrResponse->getHeader('Set-Cookie'); + $psrResponse = $psrResponse->withoutHeader('Set-Cookie'); + $response = new Response( $psrResponse->getBody()->__toString(), $psrResponse->getStatusCode(), @@ -147,7 +150,7 @@ ); $response->setProtocolVersion($psrResponse->getProtocolVersion()); - foreach ($psrResponse->getHeader('Set-Cookie') as $cookie) { + foreach ($cookies as $cookie) { $response->headers->setCookie($this->createCookie($cookie)); } @@ -210,6 +213,12 @@ continue; } + + if ('samesite' === strtolower($name) && null !== $value) { + $samesite = $value; + + continue; + } } if (!isset($cookieName)) { @@ -223,7 +232,9 @@ isset($cookiePath) ? $cookiePath : '/', isset($cookieDomain) ? $cookieDomain : null, isset($cookieSecure), - isset($cookieHttpOnly) + isset($cookieHttpOnly), + false, + isset($samesite) ? $samesite : null ); } }