fix crash on 404

This commit is contained in:
jkhsjdhjs 2017-12-02 18:44:42 +01:00
parent 9bdaad843a
commit 8545576415

View File

@ -219,7 +219,7 @@ function Websrv(tlib) {
fs.readFile(filePath, (error, content) => { fs.readFile(filePath, (error, content) => {
if(error) { if(error) {
if(error.code == 'ENOENT') { if(error.code == 'ENOENT') {
res.writeHead(404, { 'Content-Type': contentType }); res.writeHead(404);
res.end('404 - f0ck you', 'utf-8'); res.end('404 - f0ck you', 'utf-8');
} }
else { else {