License: MIT
diff --git a/svr.js b/svr.js
index 86d0283..1fbbc0e 100644
--- a/svr.js
+++ b/svr.js
@@ -71,7 +71,7 @@ function deleteFolderRecursive(path) {
}
var os = require("os");
-var version = "3.4.19";
+var version = "3.4.20";
var singlethreaded = false;
if (process.versions) process.versions.svrjs = version; //Inject SVR.JS into process.versions
@@ -1163,6 +1163,10 @@ if (!disableMods) {
if (cluster.isMaster === false) {
modloaderFolderName = ".modloader_w" + Math.floor(Math.random() * 65536);
}
+ var tempServerSideScriptName = "serverSideScript.js";
+ if (!process.isBun && cluster.isMaster === false) {
+ tempServerSideScriptName = ".serverSideScript_w" + Math.floor(Math.random() * 65536) + ".js";
+ }
for (var i = 0; i < modFiles.length; i++) {
var modFile = __dirname + "/mods/" + modFiles[i];
try {
@@ -1242,16 +1246,16 @@ if (!disableMods) {
try {
var modhead = "var readline = require('readline');\r\nvar os = require('os');\r\nvar http = require('http');\r\nvar url = require('url');\r\nvar fs = require('fs');\r\nvar path = require('path');\r\n" + (hexstrbase64 === undefined ? "" : "var hexstrbase64 = require('../hexstrbase64/index.js');\r\n") + (crypto.__disabled__ === undefined ? "var crypto = require('crypto');\r\nvar https = require('https');\r\n" : "") + "var stream = require('stream');\r\nvar customvar1;\r\nvar customvar2;\r\nvar customvar3;\r\nvar customvar4;\r\n\r\nfunction Mod() {}\r\nMod.prototype.callback = function callback(req, res, serverconsole, responseEnd, href, ext, uobject, search, defaultpage, users, page404, head, foot, fd, elseCallback, configJSON, callServerError, getCustomHeaders, origHref, redirect, parsePostData) {\r\nreturn function () {\r\nvar disableEndElseCallbackExecute = false;\r\nfunction filterHeaders(headers){for(var jsn=JSON.stringify(headers,null,2).split('\\n'),njsn=[\"{\"],i=1;i= 7 || ex.name == "SyntaxError") throw ex;
+ if (i >= 4 || ex.name == "SyntaxError") throw ex;
var now = Date.now();
while (Date.now() - now < 2);
//Try reloading mod
diff --git a/tests.html b/tests.html
index 077f604..b122751 100644
--- a/tests.html
+++ b/tests.html
@@ -1,7 +1,7 @@
- SVR.JS 3.4.19 Tests
+ SVR.JS 3.4.20 Tests
- SVR.JS 3.4.19 Tests
+ SVR.JS 3.4.20 Tests
Directory
Directory (with query)