mirror of
https://github.com/php/php-src.git
synced 2025-08-15 13:38:49 +02:00
Fix GH-17956 Internal dev server 404 page is not responsive
Add a basic viewport html meta tag with responsive mode parameters See: https://developer.mozilla.org/en-US/docs/Web/HTML/Viewport_meta_tag Updated existing tests close GH-17957
This commit is contained in:
parent
0097ad8eb3
commit
ff88701b77
3 changed files with 8 additions and 6 deletions
2
NEWS
2
NEWS
|
@ -6,6 +6,8 @@ PHP NEWS
|
|||
. Extended --ini to print INI settings changed from the builtin default.
|
||||
(timwolla)
|
||||
. Drop support for -z CLI/CGI flag. (nielsdos)
|
||||
. Fixed GH-17956 - development server 404 page does not adapt to mobiles.
|
||||
(pascalchevrel)
|
||||
|
||||
- COM:
|
||||
. Fixed property access of PHP objects wrapped in variant. (cmb)
|
||||
|
|
|
@ -2026,7 +2026,7 @@ static zend_result php_cli_server_send_error_page(php_cli_server *server, php_cl
|
|||
escaped_request_uri = php_escape_html_entities_ex((const unsigned char *) ZSTR_VAL(client->request.request_uri), ZSTR_LEN(client->request.request_uri), 0, ENT_QUOTES, NULL, /* double_encode */ 0, /* quiet */ 0);
|
||||
|
||||
{
|
||||
static const char prologue_template[] = "<!doctype html><html><head><title>%d %s</title>";
|
||||
static const char prologue_template[] = "<!doctype html><html><head><meta name=\"viewport\" content=\"width=device-width, initial-scale=1\"><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;
|
||||
|
|
|
@ -131,7 +131,7 @@ X-Powered-By: PHP/%s
|
|||
Content-Type: text/html; charset=UTF-8
|
||||
Content-Length: %d
|
||||
|
||||
<!doctype html><html><head><title>404 Not Found</title><style>AAA</style>
|
||||
<!doctype html><html><head><meta name="viewport" content="width=device-width, initial-scale=1"><title>404 Not Found</title><style>AAA</style>
|
||||
</head><body><h1>Not Found</h1><p>The requested resource <code class="url">/</code> was not found on this server.</p></body></html>
|
||||
HTTP/1.1 404 Not Found
|
||||
Host: %s
|
||||
|
@ -141,7 +141,7 @@ X-Powered-By: PHP/%s
|
|||
Content-Type: text/html; charset=UTF-8
|
||||
Content-Length: %d
|
||||
|
||||
<!doctype html><html><head><title>404 Not Found</title><style>AAA</style>
|
||||
<!doctype html><html><head><meta name="viewport" content="width=device-width, initial-scale=1"><title>404 Not Found</title><style>AAA</style>
|
||||
</head><body><h1>Not Found</h1><p>The requested resource <code class="url">/main/style.css</code> was not found on this server.</p></body></html>
|
||||
HTTP/1.1 404 Not Found
|
||||
Host: %s
|
||||
|
@ -161,7 +161,7 @@ Content-Type: text/html; charset=UTF-8
|
|||
Content-Length: %d
|
||||
Allow: GET, HEAD, POST
|
||||
|
||||
<!doctype html><html><head><title>405 Method Not Allowed</title><style>AAA</style>
|
||||
<!doctype html><html><head><meta name="viewport" content="width=device-width, initial-scale=1"><title>405 Method Not Allowed</title><style>AAA</style>
|
||||
</head><body><h1>Method Not Allowed</h1><p>Requested method not allowed.</p></body></html>
|
||||
HTTP/1.1 405 Method Not Allowed
|
||||
Host: %s
|
||||
|
@ -172,7 +172,7 @@ Content-Type: text/html; charset=UTF-8
|
|||
Content-Length: %d
|
||||
Allow: GET, HEAD, POST
|
||||
|
||||
<!doctype html><html><head><title>405 Method Not Allowed</title><style>AAA</style>
|
||||
<!doctype html><html><head><meta name="viewport" content="width=device-width, initial-scale=1"><title>405 Method Not Allowed</title><style>AAA</style>
|
||||
</head><body><h1>Method Not Allowed</h1><p>Requested method not allowed.</p></body></html>
|
||||
HTTP/1.1 405 Method Not Allowed
|
||||
Host: %s
|
||||
|
@ -183,5 +183,5 @@ Content-Type: text/html; charset=UTF-8
|
|||
Content-Length: %d
|
||||
Allow: GET, HEAD, POST
|
||||
|
||||
<!doctype html><html><head><title>405 Method Not Allowed</title><style>AAA</style>
|
||||
<!doctype html><html><head><meta name="viewport" content="width=device-width, initial-scale=1"><title>405 Method Not Allowed</title><style>AAA</style>
|
||||
</head><body><h1>Method Not Allowed</h1><p>Requested method not allowed.</p></body></html>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue