diff options
author | Rowan Collins <rowan.collins@gmail.com> | 2016-10-24 18:01:17 +0000 |
---|---|---|
committer | Julien Pauli <jpauli@php.net> | 2016-11-17 11:04:57 +0100 |
commit | eba5e276c75ce5855b2d3246991c3757417c914b (patch) | |
tree | 70b77fa350bb285e79e49d255d3126704bc0e437 | |
parent | aec1a5ecccd07984d459b82ba8771962bbeb6566 (diff) | |
download | php-git-eba5e276c75ce5855b2d3246991c3757417c914b.tar.gz |
Simplify ext/standard/tests/http/bug73297.phpt
-rw-r--r-- | ext/standard/tests/http/bug73297.phpt | 44 |
1 files changed, 18 insertions, 26 deletions
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 <?php require 'server.inc'; -$ctx = stream_context_create(); - -function 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); -} - -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 - |