From: Rowan Collins Date: Mon, 24 Oct 2016 18:01:17 +0000 (+0000) Subject: Simplify ext/standard/tests/http/bug73297.phpt X-Git-Tag: php-7.1.0~3^2~17^2~2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=773bc082ca567368f29a9df826311d20e80c7047;p=php Simplify ext/standard/tests/http/bug73297.phpt --- diff --git a/ext/standard/tests/http/bug73297.phpt b/ext/standard/tests/http/bug73297.phpt index 3575ccbcaa..0b0e02f3fd 100644 --- a/ext/standard/tests/http/bug73297.phpt +++ b/ext/standard/tests/http/bug73297.phpt @@ -8,34 +8,26 @@ allow_url_fopen=1 [ - 'protocol_version' => '1.1', - 'header' => 'Connection: Close' - ], - ]; - - $ctx = stream_context_create($options); - - $responses = [ - "data://text/plain,HTTP/1.1 100 Continue\r\n\r\nHTTP/1.1 200 OK\r\n\r\n" - . "Hello" - ]; - $pid = http_server('tcp://127.0.0.1:12342', $responses); - - echo file_get_contents('http://127.0.0.1:12342/', false, $ctx); - echo "\n"; - - http_server_kill($pid); -} - -do_test(); +$options = [ + 'http' => [ + 'protocol_version' => '1.1', + 'header' => 'Connection: Close' + ], +]; + +$ctx = stream_context_create($options); + +$responses = [ + "data://text/plain,HTTP/1.1 100 Continue\r\n\r\nHTTP/1.1 200 OK\r\n\r\n" + . "Hello" +]; +$pid = http_server('tcp://127.0.0.1:12342', $responses); + +echo file_get_contents('http://127.0.0.1:12342/', false, $ctx); echo "\n"; +http_server_kill($pid); + ?> --EXPECT-- Hello -