From ea441bd08dc1d9f5bd167f3f495321c5225909b6 Mon Sep 17 00:00:00 2001 From: Xinchen Hui Date: Wed, 10 Oct 2012 17:23:30 +0800 Subject: Implemented FR #63242 (Default error page in PHP built-in web server uses outdated html/css) --- sapi/cli/php_cli_server.c | 30 +++++++++--------------------- 1 file changed, 9 insertions(+), 21 deletions(-) (limited to 'sapi/cli/php_cli_server.c') diff --git a/sapi/cli/php_cli_server.c b/sapi/cli/php_cli_server.c index 4d15db44af..5f263cb322 100644 --- a/sapi/cli/php_cli_server.c +++ b/sapi/cli/php_cli_server.c @@ -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, "

%s

Your browser sent a request that this server could not understand.

" }, - { 404, "

%s

The requested resource %s was not found on this server.

" }, - { 500, "

%s

The server is temporarily unavailable.

" }, - { 501, "

%s

Request method not supported.

" } + { 400, "

%s

Your browser sent a request that this server could not understand.

" }, + { 404, "

%s

The requested resource %s was not found on this server.

" }, + { 500, "

%s

The server is temporarily unavailable.

" }, + { 501, "

%s

Request method not supported.

" } }; 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[] = "\n"; +static const char php_cli_server_css[] = "\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[] = "%d %s"; + static const char prologue_template[] = "%d %s"; 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; -- cgit v1.2.1