Add X-Powered-By header to builtin 404 page (#13092)

As requested by 30929c9a88 (r1434156785).
This commit is contained in:
Ilija Tovilo 2024-01-09 16:10:39 +01:00 committed by GitHub
parent 59c38969de
commit 8876639d11
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 0 deletions

View file

@ -2065,6 +2065,7 @@ static zend_result php_cli_server_send_error_page(php_cli_server *server, php_cl
goto fail;
}
append_essential_headers(&buffer, client, 1, NULL);
smart_str_appends_ex(&buffer, SAPI_PHP_VERSION_HEADER "\r\n", 1);
smart_str_appends_ex(&buffer, "Content-Type: text/html; charset=UTF-8\r\n", 1);
smart_str_appends_ex(&buffer, "Content-Length: ", 1);
smart_str_append_unsigned_ex(&buffer, php_cli_server_buffer_size(&client->content_sender.buffer), 1);