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 41
41
ob_start ('ob_gzhandler ' );
42
42
break ;
43
43
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
+
44
55
case '/404 ' :
45
56
header ('Content-Type: application/json ' , true , 404 );
46
57
break ;
Original file line number Diff line number Diff line change @@ -721,6 +721,15 @@ public function testQuery()
721
721
$ this ->assertSame ('/?a=a&b=b ' , $ body ['REQUEST_URI ' ]);
722
722
}
723
723
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
+
724
733
/**
725
734
* @requires extension zlib
726
735
*/
You can’t perform that action at this time.
0 commit comments