Test Failure Report for sapi/cli/tests/php_cli_server_018.phpt ('Implement Req #61679 (Support HTTP PATCH method)')
Script
1:
<?php 2: include "php_cli_server.inc"; 3: php_cli_server_start(<<<'PHP' 4: var_dump($_SERVER['REQUEST_METHOD']); 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: PATCH / 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(5) "PATCH"
Output
Warning: fsockopen(): unable to connect to localhost:8964 (Connection refused) in /var/php_gcov/PHP_5_5/sapi/cli/tests/php_cli_server_018.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/php_cli_server_018.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(5) "PATCH"
Generated at Thu, 23 May 2013 18:18:24 +0000 (11 hours ago)
|