Test Failure Report for sapi/cli/tests/php_cli_server_017.phpt ('Implement Req #60850 (Built in web server does not set $_SERVER['SCRIPT_FILENAME'] when using router)')
Script
1:
<?php 2: include "php_cli_server.inc"; 3: php_cli_server_start(<<<'PHP' 4: var_dump($_SERVER['SCRIPT_FILENAME']); 5: PHP 6: ); 7: 8: list($host, $port) = explode(':', PHP_CLI_SERVER_ADDRESS); 9: $port = intval($port)?:80; 10: 11: $fp = fsockopen($host, $port, $errno, $errstr, 0.5); 12: if (!$fp) { 13: die("connect failed"); 14: } 15: 16: if(fwrite($fp, <<<HEADER 17: POST / HTTP/1.1 18: Host: {$host} 19: 20: 21: HEADER 22: )) { 23: while (!feof($fp)) { 24: echo fgets($fp); 25: } 26: } 27: 28: fclose($fp); 29: ?> 30:
Expected
HTTP/1.1 200 OK
Host: %s
Connection: close
X-Powered-By: %s
Content-type: text/html
string(%d) "%sindex.php"
Output
Warning: fsockopen(): unable to connect to localhost:8964 (Connection refused) in /var/php_gcov/PHP_5_4/sapi/cli/tests/php_cli_server_017.php on line 11
connect failed
Diff
001+ Warning: fsockopen(): unable to connect to localhost:8964 (Connection refused) in /var/php_gcov/PHP_5_4/sapi/cli/tests/php_cli_server_017.php on line 11
002+ connect failed
001- HTTP/1.1 200 OK
002- Host: %s
003- Connection: close
004- X-Powered-By: %s
005- Content-type: text/html
006-
007- string(%d) "%sindex.php"
Generated at Mon, 13 May 2013 22:40:14 +0000 (5 days ago)
|