mirror of
https://github.com/php/php-src.git
synced 2024-09-25 11:57:26 +00:00
Merge branch 'PHP-5.4' of https://git.php.net/repository/php-src into PHP-5.4
* 'PHP-5.4' of https://git.php.net/repository/php-src: Implemented FR #63242 (Default error page in PHP built-in web server uses outdated html/css) Fix warnings preventing this test from passing Remove executable permission on inc
This commit is contained in:
commit
de8b0cfda7
2
NEWS
2
NEWS
@ -5,6 +5,8 @@ PHP NEWS
|
||||
?? ??? 2012, PHP 5.4.8
|
||||
|
||||
- CLI server:
|
||||
. Implemented FR #63242 (Default error page in PHP built-in web server uses
|
||||
outdated html/css). (pascal.chevrel@free.fr)
|
||||
. Changed response to unknown HTTP method to 501 according to RFC.
|
||||
(Niklas Lindgren).
|
||||
. Support HTTP PATCH method. Patch by Niklas Lindgren, GitHub PR #190.
|
||||
|
0
Zend/tests/bug40236.inc
Executable file → Normal file
0
Zend/tests/bug40236.inc
Executable file → Normal file
0
Zend/tests/ns_022.inc
Executable file → Normal file
0
Zend/tests/ns_022.inc
Executable file → Normal file
0
Zend/tests/ns_027.inc
Executable file → Normal file
0
Zend/tests/ns_027.inc
Executable file → Normal file
0
Zend/tests/ns_028.inc
Executable file → Normal file
0
Zend/tests/ns_028.inc
Executable file → Normal file
0
Zend/tests/ns_065.inc
Executable file → Normal file
0
Zend/tests/ns_065.inc
Executable file → Normal file
@ -1,5 +1,7 @@
|
||||
--TEST--
|
||||
Bug #62896 Unixtimestamp may take on local times DST flag (this test will only be valid during CEST)
|
||||
--INI--
|
||||
date.timezone=Europe/Berlin
|
||||
--FILE--
|
||||
<?php
|
||||
$tz = new DateTimeZone('Europe/Berlin');
|
||||
|
0
ext/interbase/tests/interbase.inc
Executable file → Normal file
0
ext/interbase/tests/interbase.inc
Executable file → Normal file
0
ext/interbase/tests/skipif.inc
Executable file → Normal file
0
ext/interbase/tests/skipif.inc
Executable file → Normal file
0
ext/mysql/tests/connect.inc
Executable file → Normal file
0
ext/mysql/tests/connect.inc
Executable file → Normal file
0
ext/mysql/tests/skipif.inc
Executable file → Normal file
0
ext/mysql/tests/skipif.inc
Executable file → Normal file
0
ext/mysql/tests/skipifconnectfailure.inc
Executable file → Normal file
0
ext/mysql/tests/skipifconnectfailure.inc
Executable file → Normal file
0
ext/mysqli/tests/skipifconnectfailure.inc
Executable file → Normal file
0
ext/mysqli/tests/skipifconnectfailure.inc
Executable file → Normal file
0
ext/pdo/tests/pdo.inc
Executable file → Normal file
0
ext/pdo/tests/pdo.inc
Executable file → Normal file
0
ext/pdo_mysql/tests/skipif.inc
Executable file → Normal file
0
ext/pdo_mysql/tests/skipif.inc
Executable file → Normal file
0
ext/phar/phar/clicommand.inc
Executable file → Normal file
0
ext/phar/phar/clicommand.inc
Executable file → Normal file
0
ext/phar/phar/directorygraphiterator.inc
Executable file → Normal file
0
ext/phar/phar/directorygraphiterator.inc
Executable file → Normal file
0
ext/phar/phar/directorytreeiterator.inc
Executable file → Normal file
0
ext/phar/phar/directorytreeiterator.inc
Executable file → Normal file
0
ext/phar/phar/invertedregexiterator.inc
Executable file → Normal file
0
ext/phar/phar/invertedregexiterator.inc
Executable file → Normal file
0
ext/phar/phar/phar.inc
Executable file → Normal file
0
ext/phar/phar/phar.inc
Executable file → Normal file
0
ext/phar/phar/pharcommand.inc
Executable file → Normal file
0
ext/phar/phar/pharcommand.inc
Executable file → Normal file
0
ext/session/tests/save_handler_closures.inc
Executable file → Normal file
0
ext/session/tests/save_handler_closures.inc
Executable file → Normal file
0
ext/spl/examples/autoload.inc
Executable file → Normal file
0
ext/spl/examples/autoload.inc
Executable file → Normal file
0
ext/spl/examples/callbackfilteriterator.inc
Executable file → Normal file
0
ext/spl/examples/callbackfilteriterator.inc
Executable file → Normal file
0
ext/spl/examples/dbaarray.inc
Executable file → Normal file
0
ext/spl/examples/dbaarray.inc
Executable file → Normal file
0
ext/spl/examples/dbareader.inc
Executable file → Normal file
0
ext/spl/examples/dbareader.inc
Executable file → Normal file
0
ext/spl/examples/directoryfilterdots.inc
Executable file → Normal file
0
ext/spl/examples/directoryfilterdots.inc
Executable file → Normal file
0
ext/spl/examples/directorytree.inc
Executable file → Normal file
0
ext/spl/examples/directorytree.inc
Executable file → Normal file
0
ext/spl/examples/dualiterator.inc
Executable file → Normal file
0
ext/spl/examples/dualiterator.inc
Executable file → Normal file
0
ext/spl/examples/findfile.inc
Executable file → Normal file
0
ext/spl/examples/findfile.inc
Executable file → Normal file
0
ext/spl/examples/inigroups.inc
Executable file → Normal file
0
ext/spl/examples/inigroups.inc
Executable file → Normal file
0
ext/spl/examples/keyfilter.inc
Executable file → Normal file
0
ext/spl/examples/keyfilter.inc
Executable file → Normal file
0
ext/spl/examples/recursivecomparedualiterator.inc
Executable file → Normal file
0
ext/spl/examples/recursivecomparedualiterator.inc
Executable file → Normal file
0
ext/spl/examples/recursivedualiterator.inc
Executable file → Normal file
0
ext/spl/examples/recursivedualiterator.inc
Executable file → Normal file
0
ext/spl/examples/regexfindfile.inc
Executable file → Normal file
0
ext/spl/examples/regexfindfile.inc
Executable file → Normal file
0
ext/spl/examples/searchiterator.inc
Executable file → Normal file
0
ext/spl/examples/searchiterator.inc
Executable file → Normal file
0
ext/spl/examples/tests/examples.inc
Executable file → Normal file
0
ext/spl/examples/tests/examples.inc
Executable file → Normal file
0
ext/spl/internal/appenditerator.inc
Executable file → Normal file
0
ext/spl/internal/appenditerator.inc
Executable file → Normal file
0
ext/spl/internal/cachingiterator.inc
Executable file → Normal file
0
ext/spl/internal/cachingiterator.inc
Executable file → Normal file
0
ext/spl/internal/emptyiterator.inc
Executable file → Normal file
0
ext/spl/internal/emptyiterator.inc
Executable file → Normal file
0
ext/spl/internal/filteriterator.inc
Executable file → Normal file
0
ext/spl/internal/filteriterator.inc
Executable file → Normal file
0
ext/spl/internal/infiniteiterator.inc
Executable file → Normal file
0
ext/spl/internal/infiniteiterator.inc
Executable file → Normal file
0
ext/spl/internal/iteratoriterator.inc
Executable file → Normal file
0
ext/spl/internal/iteratoriterator.inc
Executable file → Normal file
0
ext/spl/internal/limititerator.inc
Executable file → Normal file
0
ext/spl/internal/limititerator.inc
Executable file → Normal file
0
ext/spl/internal/multipleiterator.inc
Executable file → Normal file
0
ext/spl/internal/multipleiterator.inc
Executable file → Normal file
0
ext/spl/internal/norewinditerator.inc
Executable file → Normal file
0
ext/spl/internal/norewinditerator.inc
Executable file → Normal file
0
ext/spl/internal/outeriterator.inc
Executable file → Normal file
0
ext/spl/internal/outeriterator.inc
Executable file → Normal file
0
ext/spl/internal/parentiterator.inc
Executable file → Normal file
0
ext/spl/internal/parentiterator.inc
Executable file → Normal file
0
ext/spl/internal/recursivearrayiterator.inc
Executable file → Normal file
0
ext/spl/internal/recursivearrayiterator.inc
Executable file → Normal file
0
ext/spl/internal/recursivecachingiterator.inc
Executable file → Normal file
0
ext/spl/internal/recursivecachingiterator.inc
Executable file → Normal file
0
ext/spl/internal/recursivefilteriterator.inc
Executable file → Normal file
0
ext/spl/internal/recursivefilteriterator.inc
Executable file → Normal file
0
ext/spl/internal/recursiveiterator.inc
Executable file → Normal file
0
ext/spl/internal/recursiveiterator.inc
Executable file → Normal file
0
ext/spl/internal/recursiveiteratoriterator.inc
Executable file → Normal file
0
ext/spl/internal/recursiveiteratoriterator.inc
Executable file → Normal file
0
ext/spl/internal/recursiveregexiterator.inc
Executable file → Normal file
0
ext/spl/internal/recursiveregexiterator.inc
Executable file → Normal file
0
ext/spl/internal/recursivetreeiterator.inc
Executable file → Normal file
0
ext/spl/internal/recursivetreeiterator.inc
Executable file → Normal file
0
ext/spl/internal/regexiterator.inc
Executable file → Normal file
0
ext/spl/internal/regexiterator.inc
Executable file → Normal file
0
ext/spl/internal/seekableiterator.inc
Executable file → Normal file
0
ext/spl/internal/seekableiterator.inc
Executable file → Normal file
0
ext/spl/internal/splfileobject.inc
Executable file → Normal file
0
ext/spl/internal/splfileobject.inc
Executable file → Normal file
0
ext/spl/internal/splobjectstorage.inc
Executable file → Normal file
0
ext/spl/internal/splobjectstorage.inc
Executable file → Normal file
0
ext/spl/tests/testclass.class.inc
Executable file → Normal file
0
ext/spl/tests/testclass.class.inc
Executable file → Normal file
0
ext/spl/tests/testclass.inc
Executable file → Normal file
0
ext/spl/tests/testclass.inc
Executable file → Normal file
0
ext/spl/tests/testclass.php.inc
Executable file → Normal file
0
ext/spl/tests/testclass.php.inc
Executable file → Normal file
@ -245,10 +245,10 @@ static php_cli_server_http_reponse_status_code_pair status_map[] = {
|
||||
};
|
||||
|
||||
static php_cli_server_http_reponse_status_code_pair template_map[] = {
|
||||
{ 400, "<h1 class=\"h\">%s</h1><p>Your browser sent a request that this server could not understand.</p>" },
|
||||
{ 404, "<h1 class=\"h\">%s</h1><p>The requested resource %s was not found on this server.</p>" },
|
||||
{ 500, "<h1 class=\"h\">%s</h1><p>The server is temporarily unavailable.</p>" },
|
||||
{ 501, "<h1 class=\"h\">%s</h1><p>Request method not supported.</p>" }
|
||||
{ 400, "<h1>%s</h1><p>Your browser sent a request that this server could not understand.</p>" },
|
||||
{ 404, "<h1>%s</h1><p>The requested resource %s was not found on this server.</p>" },
|
||||
{ 500, "<h1>%s</h1><p>The server is temporarily unavailable.</p>" },
|
||||
{ 501, "<h1>%s</h1><p>Request method not supported.</p>" }
|
||||
};
|
||||
|
||||
static php_cli_server_ext_mime_type_pair mime_type_map[] = {
|
||||
@ -279,22 +279,10 @@ ZEND_DECLARE_MODULE_GLOBALS(cli_server);
|
||||
/* {{{ static char php_cli_server_css[]
|
||||
* copied from ext/standard/info.c
|
||||
*/
|
||||
static const char php_cli_server_css[] = "<style type=\"text/css\">\n" \
|
||||
"body {background-color: #ffffff; color: #000000;}\n" \
|
||||
"body, td, th, h1, h2 {font-family: sans-serif;}\n" \
|
||||
".center {text-align: center;}\n" \
|
||||
".center table { margin-left: auto; margin-right: auto; text-align: left;}\n" \
|
||||
".center th { text-align: center !important; }\n" \
|
||||
"h1 {font-size: 150%;}\n" \
|
||||
"h2 {font-size: 125%;}\n" \
|
||||
".p {text-align: left;}\n" \
|
||||
".e {background-color: #ccccff; font-weight: bold; color: #000000;}\n" \
|
||||
".h {background-color: #9999cc; font-weight: bold; color: #000000;}\n" \
|
||||
".v {background-color: #cccccc; color: #000000;}\n" \
|
||||
".vr {background-color: #cccccc; text-align: right; color: #000000;}\n" \
|
||||
"img {float: right; border: 0px;}\n" \
|
||||
"hr {width: 600px; background-color: #cccccc; border: 0px; height: 1px; color: #000000;}\n" \
|
||||
"</style>\n";
|
||||
static const char php_cli_server_css[] = "<style>\n" \
|
||||
"body { background-color: #ffffff; color: #000000; }\n" \
|
||||
"h1 { font-family: sans-serif; font-size: 150%; background-color: #9999cc; font-weight: bold; color: #000000; margin-top: 0;}\n" \
|
||||
"</style>\n";
|
||||
/* }}} */
|
||||
|
||||
static void char_ptr_dtor_p(char **p) /* {{{ */
|
||||
@ -1757,7 +1745,7 @@ static int php_cli_server_send_error_page(php_cli_server *server, php_cli_server
|
||||
escaped_request_uri = php_escape_html_entities_ex((unsigned char *)client->request.request_uri, client->request.request_uri_len, &escaped_request_uri_len, 0, ENT_QUOTES, NULL, 0 TSRMLS_CC);
|
||||
|
||||
{
|
||||
static const char prologue_template[] = "<html><head><title>%d %s</title>";
|
||||
static const char prologue_template[] = "<!doctype html><html><head><title>%d %s</title>";
|
||||
php_cli_server_chunk *chunk = php_cli_server_chunk_heap_new_self_contained(strlen(prologue_template) + 3 + strlen(status_string) + 1);
|
||||
if (!chunk) {
|
||||
goto fail;
|
||||
|
@ -33,7 +33,7 @@ HEADER
|
||||
}
|
||||
}
|
||||
|
||||
echo preg_replace("/<style type=\"text\/css\">(.*?)<\/style>/s", "<style type=\"text/css\">AAA</style>", $output), "\n";
|
||||
echo preg_replace("/<style>(.*?)<\/style>/s", "<style>AAA</style>", $output), "\n";
|
||||
fclose($fp);
|
||||
|
||||
|
||||
@ -55,7 +55,7 @@ HEADER
|
||||
}
|
||||
}
|
||||
|
||||
echo preg_replace("/<style type=\"text\/css\">(.*?)<\/style>/s", "<style type=\"text/css\">AAA</style>", $output), "\n";
|
||||
echo preg_replace("/<style>(.*?)<\/style>/s", "<style>AAA</style>", $output), "\n";
|
||||
fclose($fp);
|
||||
|
||||
$output = '';
|
||||
@ -76,7 +76,7 @@ HEADER
|
||||
}
|
||||
}
|
||||
|
||||
echo preg_replace("/<style type=\"text\/css\">(.*?)<\/style>/s", "<style type=\"text/css\">AAA</style>", $output), "\n";
|
||||
echo preg_replace("/<style>(.*?)<\/style>/s", "<style>AAA</style>", $output), "\n";
|
||||
fclose($fp);
|
||||
?>
|
||||
--EXPECTF--
|
||||
@ -87,22 +87,22 @@ Connection: close
|
||||
Content-Type: text/html; charset=UTF-8
|
||||
Content-Length: %d
|
||||
|
||||
<html><head><title>404 Not Found</title><style type="text/css">AAA</style>
|
||||
</head><body><h1 class="h">Not Found</h1><p>The requested resource / was not found on this server.</p></body></html>
|
||||
<!doctype html><html><head><title>404 Not Found</title><style>AAA</style>
|
||||
</head><body><h1>Not Found</h1><p>The requested resource / was not found on this server.</p></body></html>
|
||||
HTTP/1.1 404 Not Found
|
||||
Host: %s
|
||||
Connection: close
|
||||
Content-Type: text/html; charset=UTF-8
|
||||
Content-Length: %d
|
||||
|
||||
<html><head><title>404 Not Found</title><style type="text/css">AAA</style>
|
||||
</head><body><h1 class="h">Not Found</h1><p>The requested resource /main/style.css was not found on this server.</p></body></html>
|
||||
<!doctype html><html><head><title>404 Not Found</title><style>AAA</style>
|
||||
</head><body><h1>Not Found</h1><p>The requested resource /main/style.css was not found on this server.</p></body></html>
|
||||
HTTP/1.1 404 Not Found
|
||||
Host: %s
|
||||
Connection: close
|
||||
Content-Type: text/html; charset=UTF-8
|
||||
Content-Length: %d
|
||||
|
||||
<html><head><title>404 Not Found</title><style type="text/css">AAA</style>
|
||||
</head><body><h1 class="h">Not Found</h1><p>The requested resource /main/foo/bar was not found on this server.</p></body></html>
|
||||
<!doctype html><html><head><title>404 Not Found</title><style>AAA</style>
|
||||
</head><body><h1>Not Found</h1><p>The requested resource /main/foo/bar was not found on this server.</p></body></html>
|
||||
|
||||
|
@ -57,7 +57,7 @@ HEADER
|
||||
}
|
||||
}
|
||||
|
||||
echo preg_replace("/<style type=\"text\/css\">(.*?)<\/style>/s", "<style type=\"text/css\">AAA</style>", $output), "\n";
|
||||
echo preg_replace("/<style>(.*?)<\/style>/s", "<style>AAA</style>", $output), "\n";
|
||||
fclose($fp);
|
||||
|
||||
?>
|
||||
@ -76,5 +76,5 @@ Connection: close
|
||||
Content-Type: %s
|
||||
Content-Length: %d
|
||||
|
||||
<html><head><title>404 Not Found</title><style type="text/css">AAA</style>
|
||||
</head><body><h1 class="h">Not Found</h1><p>The requested resource /main/no-exists.php was not found on this server.</p></body></html>
|
||||
<!doctype html><html><head><title>404 Not Found</title><style>AAA</style>
|
||||
</head><body><h1>Not Found</h1><p>The requested resource /main/no-exists.php was not found on this server.</p></body></html>
|
||||
|
0
tests/lang/015.inc
Executable file → Normal file
0
tests/lang/015.inc
Executable file → Normal file
0
tests/lang/016.inc
Executable file → Normal file
0
tests/lang/016.inc
Executable file → Normal file
0
tests/lang/023-1.inc
Executable file → Normal file
0
tests/lang/023-1.inc
Executable file → Normal file
0
tests/lang/023-2.inc
Executable file → Normal file
0
tests/lang/023-2.inc
Executable file → Normal file
0
tests/lang/bug38579.inc
Executable file → Normal file
0
tests/lang/bug38579.inc
Executable file → Normal file
Loading…
Reference in New Issue
Block a user