Test Failure Report for sapi/cli/tests/bug61679.phpt ('Bug #61679 (Error on non-standard HTTP methods)')
Script
1:
<?php 2: include "php_cli_server.inc"; 3: php_cli_server_start(<<<'PHP' 4: echo "This should never echo"; 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: // Send a request with a fictitious request method, 17: // I like smurfs, the smurf everything. 18: if(fwrite($fp, <<<HEADER 19: SMURF / HTTP/1.1 20: Host: {$host} 21: 22: 23: HEADER 24: )) { 25: while (!feof($fp)) { 26: echo fgets($fp); 27: // Only echo the first line from the response, 28: // the rest is not interesting 29: break; 30: } 31: } 32: 33: fclose($fp); 34: ?> 35:
Expected
HTTP/1.1 501 Not Implemented
Output
Warning: fsockopen(): unable to connect to localhost:8964 (Connection refused) in /var/php_gcov/PHP_5_5/sapi/cli/tests/bug61679.php on line 11
connect failed
Diff
001+ Warning: fsockopen(): unable to connect to localhost:8964 (Connection refused) in /var/php_gcov/PHP_5_5/sapi/cli/tests/bug61679.php on line 11
001- HTTP/1.1 501 Not Implemented
002+ connect failed
Generated at Wed, 15 May 2013 22:03:26 +0000 (7 days ago)
|