Various fixes I've accrued. Minor cleanups and more tracing in serialize. Turn off memory tracking. Fix Let's Encrypt.

git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@4218 ed5197a5-7fde-0310-b194-c3ffbd925b24
This commit is contained in:
2023-03-12 22:16:18 +00:00
parent 2ab1b84432
commit a32bb02223
4 changed files with 68 additions and 57 deletions

View File

@ -831,10 +831,12 @@ function message(event) {
function reconnect(path) {
let oldSocket = gSocket;
gSocket = null
oldSocket.onopen = null;
oldSocket.onclose = null;
oldSocket.onmessage = null;
oldSocket.close();
if (oldSocket) {
oldSocket.onopen = null;
oldSocket.onclose = null;
oldSocket.onmessage = null;
oldSocket.close();
}
connectSocket(path);
}

View File

@ -493,7 +493,7 @@ function handleConnection(client) {
parsing_header = false;
inputBuffer = inputBuffer.slice(result.bytes_parsed);
if (!client.tls && tildefriends.https_port && core.globalSettings.http_redirect) {
if (!client.tls && tildefriends.https_port && core.globalSettings.http_redirect && !result.path.startsWith('/.well-known/')) {
let requestObject = new Request(request[0], request[1], request[2], headers, body, client);
let response = new Response(requestObject, client);
response.writeHead(303, {"Location": `${core.globalSettings.http_redirect}${result.path}`, "Content-Length": "0"});