diff options
| author | Xinchen Hui <laruence@php.net> | 2011-11-01 13:06:41 +0000 |
|---|---|---|
| committer | Xinchen Hui <laruence@php.net> | 2011-11-01 13:06:41 +0000 |
| commit | bba44800aee09008f61b8bdb671a913eab49ad9b (patch) | |
| tree | f5203c8c770592e222177d6bda894ed22bb975c8 /sapi | |
| parent | c0402915e70e73d67c4618410b12fa23de2c74a0 (diff) | |
| download | php-git-bba44800aee09008f61b8bdb671a913eab49ad9b.tar.gz | |
Fixed bug #60189 (php logo can not be displayed)
Diffstat (limited to 'sapi')
| -rw-r--r-- | sapi/cli/php_cli_server.c | 2 | ||||
| -rw-r--r-- | sapi/cli/tests/php_cli_server_011.phpt | 41 |
2 files changed, 42 insertions, 1 deletions
diff --git a/sapi/cli/php_cli_server.c b/sapi/cli/php_cli_server.c index 67df608672..597efc8e63 100644 --- a/sapi/cli/php_cli_server.c +++ b/sapi/cli/php_cli_server.c @@ -1931,7 +1931,7 @@ static int php_cli_server_dispatch_router(php_cli_server *server, php_cli_server destroy_request_info(&SG(request_info)); return -1; } - { + if (!php_handle_special_queries(TSRMLS_C)) { zend_file_handle zfd; char *old_cwd; diff --git a/sapi/cli/tests/php_cli_server_011.phpt b/sapi/cli/tests/php_cli_server_011.phpt new file mode 100644 index 0000000000..a957a8ed4c --- /dev/null +++ b/sapi/cli/tests/php_cli_server_011.phpt @@ -0,0 +1,41 @@ +--TEST-- +Bug #60180 ($_SERVER["PHP_SELF"] incorrect) +--SKIPIF-- +<?php +include "skipif.inc"; +?> +--FILE-- +<?php +include "php_cli_server.inc"; +php_cli_server_start('sytanx error;', TRUE); + +list($host, $port) = explode(':', PHP_CLI_SERVER_ADDRESS); +$port = intval($port)?:80; + +$fp = fsockopen($host, $port, $errno, $errstr, 0.5); +if (!$fp) { + die("connect failed"); +} + +$logo_id = php_logo_guid(); + +if(fwrite($fp, <<<HEADER +GET /?={$logo_id} HTTP/1.1 +Host: {$host} + + +HEADER +)) { + while (!feof($fp)) { + if (("Content-Type: image/gif") == trim(fgets($fp))) { + echo "okey"; + break; + } + } +} + +fclose($fp); + +?> +--EXPECTF-- +okey |
