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"; 10php_cli_server_start('print_r($_REQUEST); $_REQUEST["foo"] = "bar"; return FALSE;'); 11$doc_root = __DIR__; 12file_put_contents($doc_root . '/request.php', '<?php print_r($_REQUEST); ?>'); 13 14list($host, $port) = explode(':', PHP_CLI_SERVER_ADDRESS); 15$port = intval($port)?:80; 16 17$fp = fsockopen($host, $port, $errno, $errstr, 0.5); 18if (!$fp) { 19 die("connect failed"); 20} 21 22if(fwrite($fp, <<<HEADER 23POST /request.php HTTP/1.1 24Host: {$host} 25Content-Type: application/x-www-form-urlencoded 26Content-Length: 3 27 28a=b 29HEADER 30)) { 31 while (!feof($fp)) { 32 echo fgets($fp); 33 } 34} 35 36fclose($fp); 37@unlink($doc_root . '/request.php'); 38 39?> 40--EXPECTF-- 41HTTP/1.1 200 OK 42Host: %s 43Connection: close 44X-Powered-By: PHP/%s 45Content-type: text/html; charset=UTF-8 46 47Array 48( 49 [a] => b 50) 51Array 52( 53 [a] => b 54 [foo] => bar 55) 56