Debug features for leaked promises. And then chased down some subsequent use after free issues.

git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@3985 ed5197a5-7fde-0310-b194-c3ffbd925b24
This commit is contained in:
2022-09-22 00:38:26 +00:00
parent ab1f47ee9a
commit 8279ec5e9e
4 changed files with 125 additions and 16 deletions

View File

@ -793,6 +793,10 @@ loadSettings().then(function() {
var data = trace();
response.writeHead(200, {"Content-Type": "application/json; charset=utf-8", "Content-Length": data.length.toString()});
return response.end(data);
} else if (match = /^\/debug$/.exec(request.uri)) {
var data = JSON.stringify(getDebug(), null, 2);
response.writeHead(200, {"Content-Type": "application/json; charset=utf-8", "Content-Length": data.length.toString()});
return response.end(data);
} else if (request.uri == "/robots.txt") {
return blobHandler(request, response, null, request.uri);
} else if ((match = /^\/.well-known\/(.*)/.exec(request.uri)) && request.uri.indexOf("..") == -1) {