mirror of
https://github.com/php/php-src.git
synced 2024-09-22 18:37:25 +00:00
Fixed bug #60189 (php logo can not be displayed)
This commit is contained in:
parent
c0402915e7
commit
bba44800ae
@ -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;
|
||||
|
||||
|
41
sapi/cli/tests/php_cli_server_011.phpt
Normal file
41
sapi/cli/tests/php_cli_server_011.phpt
Normal file
@ -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
|
Loading…
Reference in New Issue
Block a user