summaryrefslogtreecommitdiff
path: root/ext/node/polyfills/http.ts
diff options
context:
space:
mode:
Diffstat (limited to 'ext/node/polyfills/http.ts')
-rw-r--r--ext/node/polyfills/http.ts3
1 files changed, 2 insertions, 1 deletions
diff --git a/ext/node/polyfills/http.ts b/ext/node/polyfills/http.ts
index 015a91816..920f3a5b0 100644
--- a/ext/node/polyfills/http.ts
+++ b/ext/node/polyfills/http.ts
@@ -1781,7 +1781,8 @@ export class ServerImpl extends EventEmitter {
});
const req = new IncomingMessageForServer(socket);
- req.url = request.url?.slice(req.url.indexOf("/", 8));
+ // Slice off the origin so that we only have pathname + search
+ req.url = request.url?.slice(request.url.indexOf("/", 8));
req.method = request.method;
req.upgrade =
request.headers.get("connection")?.toLowerCase().includes("upgrade") &&