From 2cab4349f979c8d06b128dac8522ff845d48a5e5 Mon Sep 17 00:00:00 2001 From: Dorian Niemiec Date: Sun, 3 Dec 2023 14:04:38 +0100 Subject: [PATCH] Minor code style corrections --- svr.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/svr.js b/svr.js index 4799cd1..abab8af 100644 --- a/svr.js +++ b/svr.js @@ -3312,14 +3312,14 @@ if (!cluster.isPrimary) { var levelDownCount = 0; // Loop through the path components - for (var i = 0; i < pathComponents.length; i += 1) { + for (var i = 0; i < pathComponents.length; i++) { // If the component is "..", decrement the levelUpCount if (".." === pathComponents[i]) { - levelUpCount -= 1; + levelUpCount--; } // If the component is not "." or an empty string, increment the levelDownCount else if ("." !== pathComponents[i] && "" !== pathComponents[i]) { - levelDownCount += 1; + levelDownCount++; } } @@ -3334,7 +3334,7 @@ if (!cluster.isPrimary) { if (isProxy) { var eheaders = getCustomHeaders(); eheaders["Content-Type"] = "text/html; charset=utf-8"; - res.writeHead(501, "Not implemented", eheaders); + res.writeHead(501, "Not Implemented", eheaders); res.write("Proxy not implemented

Proxy not implemented

SVR.JS doesn't support proxy without proxy mod. If you're administator of this server, then install this mod in order to use SVR.JS as a proxy.

" + (exposeServerVersion ? "SVR.JS/" + version + " (" + getOS() + "; " + (process.isBun ? ("Bun/v" + process.versions.bun + "; like Node.JS/" + process.version) : ("Node.JS/" + process.version)) + ")" : "SVR.JS") + "

"); res.end(); serverconsole.errmessage("SVR.JS doesn't support proxy without proxy mod.");