From 854557641506976eb4b5940f2413e3176343197a Mon Sep 17 00:00:00 2001 From: jkhsjdhjs Date: Sat, 2 Dec 2017 18:44:42 +0100 Subject: [PATCH] fix crash on 404 --- src/websrv.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/websrv.js b/src/websrv.js index a47948e..34c91a6 100644 --- a/src/websrv.js +++ b/src/websrv.js @@ -219,7 +219,7 @@ function Websrv(tlib) { fs.readFile(filePath, (error, content) => { if(error) { if(error.code == 'ENOENT') { - res.writeHead(404, { 'Content-Type': contentType }); + res.writeHead(404); res.end('404 - f0ck you', 'utf-8'); } else {