diff --git a/src/Router.php b/src/Router.php index 61f8737..b69966f 100644 --- a/src/Router.php +++ b/src/Router.php @@ -46,9 +46,11 @@ // Return HTML page if supported by client if ($_SERVER["HTTP_ACCEPT"] === "*/*" || strpos($_SERVER["HTTP_ACCEPT"] ?? "", "text/html") !== false) { + header("Content-Type: text/html", true); die(sprintf(file_get_contents(__DIR__ . "/error.html"), $error->value, $error->name)); } + header("Content-Type: text/plain", true); die($error->name); }