@@ -852,6 +852,38 @@ public function testResponseHeadersWithMultipleRequests(): void
852
852
$ this ->assertSame (200 , $ response ->getStatusCode ());
853
853
}
854
854
855
+ public function testResponseHeadersWithMultipleSetCookies (): void
856
+ {
857
+ $ request = $ this ->getRequest ([
858
+ 'base_uri ' => 'https://github.com/ ' ,
859
+ ]);
860
+
861
+ $ output = "HTTP/2 200
862
+ server: GitHub.com
863
+ date: Sat, 11 Nov 2023 02:26:55 GMT
864
+ content-type: text/html; charset=utf-8
865
+ set-cookie: _gh_sess=PlRlha1YumlLhLuo5MuNbIWJRO9RRuR%2FHfYsWRh5B0mkalFIZstlAbTmSstl8q%2FAC57IsWMVuFHWQc6L4qDHQJrwhuYVO5ZaigPCUjAStnhh%2FieZQVqIf92Al7vusuzx2o8XH%2Fv6nd9qzMTAWc2%2FkRsl8jxPQYGNaWeuUBY2w3%2FDORSikN4c0vHOyedhU7Xcv3Ryz5xD3DNxK9R8xKNZ6OSXLJ6bjX8iIT6LxvroVIf2HjvowW9cQsq0kN08mS6KtTnH0mD3ANWqsVVWeMzFNA%3D%3D--Jx830Q9Nmkfz9OGA--kEcPtNphvjNMopYqFDxUbw%3D%3D; Path=/; HttpOnly; Secure; SameSite=Lax
866
+ set-cookie: _octo=GH1.1.599292127.1699669625; Path=/; Domain=github.com; Expires=Mon, 11 Nov 2024 02:27:05 GMT; Secure; SameSite=Lax
867
+ set-cookie: logged_in=no; Path=/; Domain=github.com; Expires=Mon, 11 Nov 2024 02:27:05 GMT; HttpOnly; Secure; SameSite=Lax
868
+ accept-ranges: bytes \x0d\x0a\x0d\x0a" ;
869
+ $ request ->setOutput ($ output );
870
+
871
+ $ response = $ request ->get ('/ ' );
872
+
873
+ $ setCookieHeaders = $ response ->header ('set-cookie ' );
874
+
875
+ $ this ->assertCount (3 , $ setCookieHeaders );
876
+ $ this ->assertSame (
877
+ 'logged_in=no; Path=/; Domain=github.com; Expires=Mon, 11 Nov 2024 02:27:05 GMT; HttpOnly; Secure; SameSite=Lax ' ,
878
+ $ setCookieHeaders [2 ]->getValue ()
879
+ );
880
+
881
+ $ this ->assertSame (
882
+ '_octo=GH1.1.599292127.1699669625; Path=/; Domain=github.com; Expires=Mon, 11 Nov 2024 02:27:05 GMT; Secure; SameSite=Lax ' ,
883
+ $ setCookieHeaders [1 ]->getValueLine ()
884
+ );
885
+ }
886
+
855
887
public function testSplitResponse (): void
856
888
{
857
889
$ request = $ this ->getRequest ([
0 commit comments