1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00

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

View File

@@ -127,6 +127,7 @@ HTTP/1.1 404 Not Found
Host: %s
Date: %s
Connection: close
X-Powered-By: PHP/%s
Content-Type: text/html; charset=UTF-8
Content-Length: %d
@@ -136,6 +137,7 @@ HTTP/1.1 404 Not Found
Host: %s
Date: %s
Connection: close
X-Powered-By: PHP/%s
Content-Type: text/html; charset=UTF-8
Content-Length: %d
@@ -145,6 +147,7 @@ HTTP/1.1 404 Not Found
Host: %s
Date: %s
Connection: close
X-Powered-By: PHP/%s
Content-Type: text/html; charset=UTF-8
Content-Length: %d
@@ -153,6 +156,7 @@ HTTP/1.1 405 Method Not Allowed
Host: %s
Date: %s
Connection: close
X-Powered-By: PHP/%s
Content-Type: text/html; charset=UTF-8
Content-Length: %d
Allow: GET, HEAD, POST
@@ -163,6 +167,7 @@ HTTP/1.1 405 Method Not Allowed
Host: %s
Date: %s
Connection: close
X-Powered-By: PHP/%s
Content-Type: text/html; charset=UTF-8
Content-Length: %d
Allow: GET, HEAD, POST
@@ -173,6 +178,7 @@ HTTP/1.1 405 Method Not Allowed
Host: %s
Date: %s
Connection: close
X-Powered-By: PHP/%s
Content-Type: text/html; charset=UTF-8
Content-Length: %d
Allow: GET, HEAD, POST

View File

@@ -65,6 +65,7 @@ HTTP/1.1 404 Not Found
Host: %s
Date: %s
Connection: close
X-Powered-By: PHP/%s
Content-Type: %s
Content-Length: %d