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:
Pascal Chevrel 2025-03-02 14:08:28 +01:00 committed by David Carlier
parent 0097ad8eb3
commit ff88701b77
No known key found for this signature in database
GPG key ID: 2FB76A8CE6CD2B41
3 changed files with 8 additions and 6 deletions

View file

@ -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;