File tree Expand file tree Collapse file tree 1 file changed +18
-26
lines changed Expand file tree Collapse file tree 1 file changed +18
-26
lines changed Original file line number Diff line number Diff line change @@ -8,34 +8,26 @@ allow_url_fopen=1
8
8
<?php
9
9
require 'server.inc ' ;
10
10
11
- $ ctx = stream_context_create ();
12
-
13
- function do_test () {
14
- $ options = [
15
- 'http ' => [
16
- 'protocol_version ' => '1.1 ' ,
17
- 'header ' => 'Connection: Close '
18
- ],
19
- ];
20
-
21
- $ ctx = stream_context_create ($ options );
22
-
23
- $ responses = [
24
- "data://text/plain,HTTP/1.1 100 Continue \r\n\r\nHTTP/1.1 200 OK \r\n\r\n"
25
- . "Hello "
26
- ];
27
- $ pid = http_server ('tcp://127.0.0.1:12342 ' , $ responses );
28
-
29
- echo file_get_contents ('http://127.0.0.1:12342/ ' , false , $ ctx );
30
- echo "\n" ;
31
-
32
- http_server_kill ($ pid );
33
- }
34
-
35
- do_test ();
11
+ $ options = [
12
+ 'http ' => [
13
+ 'protocol_version ' => '1.1 ' ,
14
+ 'header ' => 'Connection: Close '
15
+ ],
16
+ ];
17
+
18
+ $ ctx = stream_context_create ($ options );
19
+
20
+ $ responses = [
21
+ "data://text/plain,HTTP/1.1 100 Continue \r\n\r\nHTTP/1.1 200 OK \r\n\r\n"
22
+ . "Hello "
23
+ ];
24
+ $ pid = http_server ('tcp://127.0.0.1:12342 ' , $ responses );
25
+
26
+ echo file_get_contents ('http://127.0.0.1:12342/ ' , false , $ ctx );
36
27
echo "\n" ;
37
28
29
+ http_server_kill ($ pid );
30
+
38
31
?>
39
32
--EXPECT--
40
33
Hello
41
-
You can’t perform that action at this time.
0 commit comments