From eba5e276c75ce5855b2d3246991c3757417c914b Mon Sep 17 00:00:00 2001 From: Rowan Collins Date: Mon, 24 Oct 2016 18:01:17 +0000 Subject: Simplify ext/standard/tests/http/bug73297.phpt --- ext/standard/tests/http/bug73297.phpt | 44 ++++++++++++++--------------------- 1 file changed, 18 insertions(+), 26 deletions(-) (limited to 'ext/standard/tests/http') 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 - -- cgit v1.2.1