com php-src: Add failing test for bug#73297: ext/standard/tests/http/bug73297.phpt
| From: | JulienPauli | Date: | Thu, 17 Nov 2016 10:04:56 +0000 |
| Subject: | com php-src: Add failing test for bug#73297: ext/standard/tests/http/bug73297.phpt | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-95832@lists.php.net to get a copy of this message | ||
Commit: 6122526cea24e4027a2f1fccc198219c543b53a2
Author: Rowan Collins <rowan.collins@gmail.com> Tue, 11 Oct 2016 21:12:18 +0000
Committer: Julien Pauli <jpauli@php.net> Thu, 17 Nov 2016 11:04:56 +0100
Parents: 9849c97b1bdfd7f0a7c499cad4cf601ebd68cc22
Branches: PHP-5.6
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=6122526cea24e4027a2f1fccc198219c543b53a2
Log:
Add failing test for bug#73297
Bugs:
https://bugs.php.net/73297
Changed paths:
A ext/standard/tests/http/bug73297.phpt
Diff:
diff --git a/ext/standard/tests/http/bug73297.phpt b/ext/standard/tests/http/bug73297.phpt
new file mode 100644
index 0000000..3575ccb
--- /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--
+<?php require 'server.inc'; http_server_skipif('tcp://127.0.0.1:12342');
?>
+--FILE--
+<?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();
+echo "\n";
+
+?>
+--EXPECT--
+Hello
+