From: Rowan Collins Date: Tue, 11 Oct 2016 21:12:18 +0000 (+0000) Subject: Add failing test for bug#73297 X-Git-Tag: php-7.0.14RC1~35^2~4 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4683377dfa6a81e632940abd92b0cbee330f89f5;p=php Add failing test for bug#73297 --- diff --git a/ext/standard/tests/http/bug73297.phpt b/ext/standard/tests/http/bug73297.phpt new file mode 100644 index 0000000000..3575ccbcaa --- /dev/null +++ b/ext/standard/tests/http/bug73297.phpt @@ -0,0 +1,41 @@ +--TEST-- +Bug #73297 (Ignore 100 Continue returned by HTTP/1.1 servers) +--INI-- +allow_url_fopen=1 +--SKIPIF-- + +--FILE-- + [ + '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(); +echo "\n"; + +?> +--EXPECT-- +Hello +