File tree 2 files changed +7
-2
lines changed
2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -140,14 +140,17 @@ protected function getTemporaryPath()
140
140
*/
141
141
public function createResponse (ResponseInterface $ psrResponse )
142
142
{
143
+ $ cookies = $ psrResponse ->getHeader ('Set-Cookie ' );
144
+ $ psrResponse = $ psrResponse ->withHeader ('Set-Cookie ' , array ());
145
+
143
146
$ response = new Response (
144
147
$ psrResponse ->getBody ()->__toString (),
145
148
$ psrResponse ->getStatusCode (),
146
149
$ psrResponse ->getHeaders ()
147
150
);
148
151
$ response ->setProtocolVersion ($ psrResponse ->getProtocolVersion ());
149
152
150
- foreach ($ psrResponse -> getHeader ( ' Set-Cookie ' ) as $ cookie ) {
153
+ foreach ($ cookies as $ cookie ) {
151
154
$ response ->headers ->setCookie ($ this ->createCookie ($ cookie ));
152
155
}
153
156
Original file line number Diff line number Diff line change @@ -64,7 +64,9 @@ public function getHeaderLine($name)
64
64
65
65
public function withHeader ($ name , $ value )
66
66
{
67
- throw new \BadMethodCallException ('Not implemented. ' );
67
+ $ this ->headers [$ name ] = (array ) $ value ;
68
+
69
+ return $ this ;
68
70
}
69
71
70
72
public function withAddedHeader ($ name , $ value )
You can’t perform that action at this time.
0 commit comments