File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -140,14 +140,17 @@ protected function getTemporaryPath()
140140 */
141141 public function createResponse (ResponseInterface $ psrResponse )
142142 {
143+ $ cookies = $ psrResponse ->getHeader ('Set-Cookie ' );
144+ $ psrResponse = $ psrResponse ->withHeader ('Set-Cookie ' , array ());
145+
143146 $ response = new Response (
144147 $ psrResponse ->getBody ()->__toString (),
145148 $ psrResponse ->getStatusCode (),
146149 $ psrResponse ->getHeaders ()
147150 );
148151 $ response ->setProtocolVersion ($ psrResponse ->getProtocolVersion ());
149152
150- foreach ($ psrResponse -> getHeader ( ' Set-Cookie ' ) as $ cookie ) {
153+ foreach ($ cookies as $ cookie ) {
151154 $ response ->headers ->setCookie ($ this ->createCookie ($ cookie ));
152155 }
153156
Original file line number Diff line number Diff line change @@ -64,7 +64,9 @@ public function getHeaderLine($name)
6464
6565 public function withHeader ($ name , $ value )
6666 {
67- throw new \BadMethodCallException ('Not implemented. ' );
67+ $ this ->headers [$ name ] = (array ) $ value ;
68+
69+ return $ this ;
6870 }
6971
7072 public function withAddedHeader ($ name , $ value )
You can’t perform that action at this time.
0 commit comments