File tree Expand file tree Collapse file tree 2 files changed +20
-0
lines changed Expand file tree Collapse file tree 2 files changed +20
-0
lines changed Original file line number Diff line number Diff line change 4141 ob_start ('ob_gzhandler ' );
4242 break ;
4343
44+ case '/103 ' :
45+ header ('HTTP/1.1 103 Early Hints ' );
46+ header ('Link: </style.css>; rel=preload; as=style ' , false );
47+ header ('Link: </script.js>; rel=preload; as=script ' , false );
48+ echo "HTTP/1.1 200 OK \r\n" ;
49+ echo "Date: Fri, 26 May 2017 10:02:11 GMT \r\n" ;
50+ echo "Content-Length: 13 \r\n" ;
51+ echo "\r\n" ;
52+ echo 'Here the body ' ;
53+ exit ;
54+
4455 case '/404 ' :
4556 header ('Content-Type: application/json ' , true , 404 );
4657 break ;
Original file line number Diff line number Diff line change @@ -721,6 +721,15 @@ public function testQuery()
721721 $ this ->assertSame ('/?a=a&b=b ' , $ body ['REQUEST_URI ' ]);
722722 }
723723
724+ public function testInformationalResponse ()
725+ {
726+ $ client = $ this ->getHttpClient (__FUNCTION__ );
727+ $ response = $ client ->request ('GET ' , 'http://localhost:8057/103 ' );
728+
729+ $ this ->assertSame ('Here the body ' , $ response ->getContent ());
730+ $ this ->assertSame (200 , $ response ->getStatusCode ());
731+ }
732+
724733 /**
725734 * @requires extension zlib
726735 */
You can’t perform that action at this time.
0 commit comments