com php-src: Add test XFAIL for bug #70470: sapi/cli/tests/bug70470.phpt
| From: | Xinchen Hui | Date: | Fri, 11 Sep 2015 05:45:18 +0000 |
| Subject: | com php-src: Add test XFAIL for bug #70470: sapi/cli/tests/bug70470.phpt | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-89001@lists.php.net to get a copy of this message | ||
Commit: 37d814b84cff3678a2e1d56ea9d3ba3c35082e13
Author: Xinchen Hui <laruence@gmail.com> Fri, 11 Sep 2015 13:45:18 +0800
Parents: 059dd18c37d7814da4d496be0c9ab75121536c4b
Branches: PHP-5.6
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=37d814b84cff3678a2e1d56ea9d3ba3c35082e13
Log:
Add test XFAIL for bug #70470
Bugs:
https://bugs.php.net/70470
Changed paths:
A sapi/cli/tests/bug70470.phpt
Diff:
diff --git a/sapi/cli/tests/bug70470.phpt b/sapi/cli/tests/bug70470.phpt
new file mode 100644
index 0000000..c66f4c3
--- /dev/null
+++ b/sapi/cli/tests/bug70470.phpt
@@ -0,0 +1,41 @@
+--TEST--
+Bug #70470 (Built-in server truncates headers spanning over TCP packets)
+--SKIPIF--
+<?php
+include "skipif.inc";
+?>
+--XFAIL--
+bug is not fixed yet
+--FILE--
+<?php
+include "php_cli_server.inc";
+php_cli_server_start("var_dump(getAllheaders());");
+
+$fp = fsockopen(PHP_CLI_SERVER_HOSTNAME, PHP_CLI_SERVER_PORT, $errno, $errmsg, 0..5);
+
+if (!$fp) {
+ die("connect failed: " . $errmsg);
+}
+
+fwrite($fp, "GET / HTTP/1.1\r\n");
+fwrite($fp, "Host: " . PHP_CLI_SERVER_HOSTNAME . "\r\n");
+fwrite($fp, "Content");
+fwrite($fp, "-Type: text/html; charset=UTF-8\r\n");
+fwrite($fp, "Connection: clo");
+fwrite($fp, "se\r\n\r\n");
+while (!feof($fp)) {
+ echo fgets($fp);
+}
+fclose($fp);
+?>
+--EXPECTF--
+HTTP/1.1 200 OK
+%a
+array(3) {
+ ["Host"]=>
+ string(9) "localhost"
+ ["Content-Type"]=>
+ string(24) "text/html; charset=UTF-8"
+ ["Connection"]=>
+ string(5) "close"
+}