xref: /php-src/ext/standard/tests/http/bug73297.phpt (revision f39b5c4c)
1--TEST--
2Bug #73297 (Ignore 100 Continue returned by HTTP/1.1 servers)
3--INI--
4allow_url_fopen=1
5--SKIPIF--
6<?php require 'server.inc'; http_server_skipif(); ?>
7--FILE--
8<?php
9require 'server.inc';
10
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' => $pid, 'uri' => $uri] = http_server($responses);
25
26echo file_get_contents($uri, false, $ctx);
27echo "\n";
28
29http_server_kill($pid);
30
31?>
32--EXPECT--
33Hello
34