From aee271ec0d30c332bed32b5eca1fdff1cb447eab Mon Sep 17 00:00:00 2001 From: Andrea Faulds Date: Thu, 17 Oct 2013 22:19:09 +0000 Subject: Implemented FR #65917 (getallheaders() is not supported by the built-in...) - Implemented apache_request_headers() and getallheaders() alias in CLI server - Implemented apache_response_headers() in CLI server using FastCGI code Conflicts: NEWS UPGRADING --- sapi/cli/tests/php_cli_server_019.phpt | 46 ++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 sapi/cli/tests/php_cli_server_019.phpt (limited to 'sapi/cli/tests') diff --git a/sapi/cli/tests/php_cli_server_019.phpt b/sapi/cli/tests/php_cli_server_019.phpt new file mode 100644 index 0000000000..8001f51941 --- /dev/null +++ b/sapi/cli/tests/php_cli_server_019.phpt @@ -0,0 +1,46 @@ +--TEST-- +Implement Req #65917 (getallheaders() is not supported by the built-in web server) +--SKIPIF-- + +--FILE-- +array( + 'method'=>"GET", + 'header'=>"Foo-Bar: bar\r\n" + ) +); + +$context = stream_context_create($opts); +echo file_get_contents('http://' . PHP_CLI_SERVER_ADDRESS, false, $context); +?> +--EXPECTF-- +array(2) { + ["Host"]=> + string(%s) "%s:%s" + ["Foo-Bar"]=> + string(3) "bar" +} +array(2) { + ["Host"]=> + string(%s) "%s:%s" + ["Foo-Bar"]=> + string(3) "bar" +} +array(2) { + ["X-Powered-By"]=> + string(%s) "PHP/%s" + ["Content-Type"]=> + string(10) "text/plain" +} -- cgit v1.2.1