From bc35c3349f2a5c4f69565aff58c86ffd388d3ffc Mon Sep 17 00:00:00 2001 From: ansuz Date: Thu, 12 Apr 2018 17:24:51 +0200 Subject: [PATCH] set content-type headers for the 404 page --- server.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/server.js b/server.js index a7830cbaf..1ff289f64 100644 --- a/server.js +++ b/server.js @@ -188,6 +188,7 @@ var custom_four04_path = Path.resolve(__dirname + '/customize/404.html'); var send404 = function (res, path) { if (!path && path !== four04_path) { path = four04_path; } Fs.exists(path, function (exists) { + res.setHeader('Content-Type', 'text/html; charset=utf-8'); if (exists) { return Fs.createReadStream(path).pipe(res); } send404(res); }); @@ -250,4 +251,4 @@ var nt = nThen(function (w) { if (config.debugReplName) { require('replify')({ name: config.debugReplName, app: debuggableStore }); -} \ No newline at end of file +}