com php-src: Simplify ext/standard/tests/http/bug73297.phpt: ext/standard/tests/http/bug73297.phpt

From: Date: Thu, 17 Nov 2016 10:04:57 +0000
Subject: com php-src: Simplify ext/standard/tests/http/bug73297.phpt: ext/standard/tests/http/bug73297.phpt
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-95834@lists.php.net to get a copy of this message
Commit: eba5e276c75ce5855b2d3246991c3757417c914b Author: Rowan Collins <rowan.collins@gmail.com> Mon, 24 Oct 2016 18:01:17 +0000 Committer: Julien Pauli <jpauli@php.net> Thu, 17 Nov 2016 11:04:57 +0100 Parents: aec1a5ecccd07984d459b82ba8771962bbeb6566 Branches: PHP-5.6 Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=eba5e276c75ce5855b2d3246991c3757417c914b Log: Simplify ext/standard/tests/http/bug73297.phpt Bugs: https://bugs.php.net/73297 Changed paths: M ext/standard/tests/http/bug73297.phpt Diff: diff --git a/ext/standard/tests/http/bug73297.phpt b/ext/standard/tests/http/bug73297.phpt index 3575ccb..0b0e02f 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 -

« previous php.cvs (#95834) next »