diff --git a/svr.js b/svr.js index 39b8d49..3b865e9 100644 --- a/svr.js +++ b/svr.js @@ -2956,7 +2956,7 @@ if (!cluster.isPrimary) { if (req.headers["x-svr-js-from-main-thread"] == "true" && req.socket && (!req.socket.remoteAddress || req.socket.remoteAddress == "::1" || req.socket.remoteAddress == "::ffff:127.0.0.1" || req.socket.remoteAddress == "127.0.0.1" || req.socket.remoteAddress == "localhost" || req.socket.remoteAddress == host || req.socket.remoteAddress == "::ffff:" + host)) { var headers = getCustomHeaders(); - res.writeHead(204, "No Content", headers); + res.writeHead(204, http.STATUS_CODES[204], headers); res.end(); return; } @@ -3464,7 +3464,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, http.STATUS_CODES[501], eheaders); res.write("
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").replace(/&/g, "&").replace(//g, ">") + "
"); res.end(); serverconsole.errmessage("SVR.JS doesn't support proxy without proxy mod."); @@ -3474,7 +3474,7 @@ if (!cluster.isPrimary) { if (req.method == "OPTIONS") { var hdss = getCustomHeaders(); hdss["Allow"] = "GET, POST, HEAD, OPTIONS"; - res.writeHead(204, "No Content", hdss); + res.writeHead(204, http.STATUS_CODES[204], hdss); res.end(); return; } else if (req.method != "GET" && req.method != "POST" && req.method != "HEAD") { @@ -3507,7 +3507,7 @@ if (!cluster.isPrimary) { var hdhds = getCustomHeaders(); hdhds["Content-Type"] = "text/html; charset=utf-8"; - res.writeHead(200, "OK", hdhds); + res.writeHead(200, http.STATUS_CODES[200], hdhds); res.end((head == "" ? "