js: Move the global 404 response to C.

This commit is contained in:
2024-10-23 18:27:36 -04:00
parent efcb68351c
commit a0d9c3dc29
2 changed files with 5 additions and 7 deletions

View File

@ -1177,13 +1177,6 @@ loadSettings()
return blobHandler(request, response, match[1], match[2]);
} else if ((match = /^(.*)(\/(?:save|delete)?)$/.exec(request.uri))) {
return blobHandler(request, response, match[1], match[2]);
} else {
let data = 'File not found.';
response.writeHead(404, {
'Content-Type': 'text/plain; charset=utf-8',
'Content-Length': data.length.toString(),
});
return response.end(data);
}
});
let port = httpd.start(tildefriends.http_port);