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

+1-1
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

+3-1
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)