Added important 418 teapot error
This commit is contained in:
parent
ce3aa574ea
commit
8b49b26f24
@ -54,6 +54,7 @@ const HTTP_STATUS_DESCRIPTIONS = [
|
||||
413 => 'Request Entity Too Large',
|
||||
414 => 'Request-URI Too Large',
|
||||
415 => 'Unsupported Media Type',
|
||||
418 => 'I\'m a teapot',
|
||||
500 => 'Internal Server Error',
|
||||
501 => 'Not Implemented',
|
||||
502 => 'Bad Gateway',
|
||||
|
@ -60,8 +60,8 @@ if ($installation) {
|
||||
}
|
||||
|
||||
if ($router !== null) {
|
||||
if (!isset($_GET["site"]) && isset($_GET["error"]) &&
|
||||
is_string($_GET["error"]) && preg_match("^\d+$", $_GET["error"])) {
|
||||
if ((!isset($_GET["site"]) || $_GET["site"] === "/") && isset($_GET["error"]) &&
|
||||
is_string($_GET["error"]) && preg_match("/^\d+$/", $_GET["error"])) {
|
||||
$response = $router->returnStatusCode(intval($_GET["error"]));
|
||||
} else {
|
||||
$response = $router->run($requestedUri);
|
||||
|
Loading…
Reference in New Issue
Block a user