Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

@forklaunch/hyper-express-fork

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@forklaunch/hyper-express-fork - npm Package Compare versions

Comparing version
6.17.3
to
6.17.30
+1
-1
package.json
{
"name": "@forklaunch/hyper-express-fork",
"version": "6.17.3",
"version": "6.17.30",
"description": "High performance Node.js webserver with a simple-to-use API powered by uWebsockets.js under the hood.",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -69,5 +69,6 @@ 'use strict';

*/
handle(request, response, cursor = 0) {
handle(request, response, cursor = 0, seen_cursors = new Set([])) {
// Do not handle the request if the response has been sent aka. the request is no longer active
if (response.completed) return;
if (response.completed || seen_cursors.has(cursor)) return;
seen_cursors.add(cursor);

@@ -86,7 +87,7 @@ // Retrieve the middleware for the current cursor, track the cursor if there is a valid middleware

// This handles cases where "/docs" middleware will incorrectly match "/docs-JSON" for example
return this.handle(request, response, cursor + 1);
return this.handle(request, response, cursor + 1, seen_cursors);
}
} else {
// Since the middleware pattern does not match the start of the request path, skip this middleware
return this.handle(request, response, cursor + 1);
return this.handle(request, response, cursor + 1, seen_cursors);
}

@@ -104,3 +105,3 @@ }

// Handle this request again with an incremented cursor to execute the next middleware or route handler
this.handle(request, response, cursor + 1);
this.handle(request, response, cursor + 1, seen_cursors);
};

@@ -107,0 +108,0 @@ }