aboutsummaryrefslogtreecommitdiffstats
path: root/src/server/HttpServer.hx
diff options
context:
space:
mode:
authorRblSb <msrblsb@gmail.com>2024-08-15 10:31:23 +0300
committerRblSb <msrblsb@gmail.com>2024-08-15 10:31:23 +0300
commit6419916b7803f3c86e1b7de3899aa325edcb66d1 (patch)
tree18f53311e4ad72d01c2583b73bf3083b1f29a205 /src/server/HttpServer.hx
parent4c4eacaa87b4a7dc9233eccf4611447dcad6a727 (diff)
Show server errors as html
Diffstat (limited to 'src/server/HttpServer.hx')
-rw-r--r--src/server/HttpServer.hx1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/server/HttpServer.hx b/src/server/HttpServer.hx
index 66668a7..7622708 100644
--- a/src/server/HttpServer.hx
+++ b/src/server/HttpServer.hx
@@ -111,6 +111,7 @@ class HttpServer {
}
static function readFileError(err:Dynamic, res:ServerResponse, filePath:String):Void {
+ res.setHeader("Content-Type", getMimeType("html"));
if (err.code == "ENOENT") {
res.statusCode = 404;
var rel = JsPath.relative(dir, filePath);
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage