From 7857e0e2fae73a24cd66f75d0a950e205e41fc77 Mon Sep 17 00:00:00 2001 From: Dorian Niemiec Date: Sun, 17 Mar 2024 09:30:26 +0100 Subject: [PATCH] Optimize non-standard code functionality --- svr.js | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/svr.js b/svr.js index 27d5da8..9f23999 100644 --- a/svr.js +++ b/svr.js @@ -4528,21 +4528,17 @@ if (!cluster.isPrimary) { } redirect(location, nonscode.scode == 302 || nonscode.scode == 307, nonscode.scode == 307 || nonscode.scode == 308); return; - } else if (nonscode.scode == 403) { - callServerError(403); - serverconsole.errmessage("Content blocked."); - return; - } else if (nonscode.scode == 410) { - callServerError(410); - serverconsole.errmessage("Content is gone."); - return; - } else if (nonscode.scode == 418) { - callServerError(418); - serverconsole.errmessage("SVR.JS is always a teapot ;)"); - return; } else { callServerError(nonscode.scode); - serverconsole.errmessage("Client fails receiving content."); + if (nonscode.scode == 403) { + serverconsole.errmessage("Content blocked."); + } else if (nonscode.scode == 410) { + serverconsole.errmessage("Content is gone."); + } else if (nonscode.scode == 418) { + serverconsole.errmessage("SVR.JS is always a teapot ;)"); + } else { + serverconsole.errmessage("Client fails receiving content."); + } return; } }