Move /trace and /mem to C.

git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@4724 ed5197a5-7fde-0310-b194-c3ffbd925b24
This commit is contained in:
2024-01-02 15:43:17 +00:00
parent 9ef909c9a1
commit 709b57d84f
4 changed files with 70 additions and 50 deletions

View File

@ -988,16 +988,12 @@ loadSettings().then(function() {
return staticFileHandler(request, response, null, request.uri);
} else if (match = /^(.*)(\/(?:save|delete)?)$/.exec(request.uri)) {
return blobHandler(request, response, match[1], match[2]);
} else if (match = /^\/trace$/.exec(request.uri)) {
return stringResponse(response, trace());
} else if (match = /^\/disconnections$/.exec(request.uri)) {
return stringResponse(response, JSON.stringify(disconnectionsDebug(), null, 2));
} else if (match = /^\/debug$/.exec(request.uri)) {
return stringResponse(response, JSON.stringify(getDebug(), null, 2));
} else if (match = /^\/hitches$/.exec(request.uri)) {
return stringResponse(response, JSON.stringify(getHitches(), null, 2));
} else if (match = /^\/mem$/.exec(request.uri)) {
return stringResponse(response, JSON.stringify(getAllocations(), null, 2));
} else if ((match = /^\/.well-known\/(.*)/.exec(request.uri)) && request.uri.indexOf("..") == -1) {
return wellKnownHandler(request, response, match[1]);
} else {