1--TEST--
2Bug #60159 (Router returns false, but POST is not passed to requested resource)
3--SKIPIF--
4<?php
5include "skipif.inc";
6?>
7--FILE--
8<?php
9include "php_cli_server.inc";
10$info = php_cli_server_start('print_r($_REQUEST); $_REQUEST["foo"] = "bar"; return FALSE;');
11$doc_root = $info->docRoot;
12file_put_contents($doc_root . '/request.php', '<?php print_r($_REQUEST); ?>');
13
14$host = PHP_CLI_SERVER_HOSTNAME;
15$fp = php_cli_server_connect();
16
17if(fwrite($fp, <<<HEADER
18POST /request.php HTTP/1.1
19Host: {$host}
20Content-Type: application/x-www-form-urlencoded
21Content-Length: 3
22
23a=b
24HEADER
25)) {
26    while (!feof($fp)) {
27        echo fgets($fp);
28    }
29}
30
31fclose($fp);
32@unlink($doc_root . '/request.php');
33
34?>
35--EXPECTF--
36HTTP/1.1 200 OK
37Host: %s
38Date: %s
39Connection: close
40X-Powered-By: PHP/%s
41Content-type: text/html; charset=UTF-8
42
43Array
44(
45    [a] => b
46)
47Array
48(
49    [a] => b
50    [foo] => bar
51)
52