Skip to content

Commit 580de38

Browse files
author
Daniel Degasperi
committed
Fixed createResponse
1 parent 921f866 commit 580de38

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

Factory/HttpFoundationFactory.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ protected function getTemporaryPath()
141141
public function createResponse(ResponseInterface $psrResponse)
142142
{
143143
$cookies = $psrResponse->getHeader('Set-Cookie');
144-
$psrResponse = $psrResponse->withHeader('Set-Cookie', array());
144+
$psrResponse = $psrResponse->withoutHeader('Set-Cookie');
145145

146146
$response = new Response(
147147
$psrResponse->getBody()->__toString(),

Tests/Fixtures/Message.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,9 @@ public function withAddedHeader($name, $value)
7676

7777
public function withoutHeader($name)
7878
{
79-
throw new \BadMethodCallException('Not implemented.');
79+
unset($this->headers[$name]);
80+
81+
return $this;
8082
}
8183

8284
public function getBody()

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy