From 52e729f51de8eeaa6d66c89aeaa4444e9721e06d Mon Sep 17 00:00:00 2001 From: Dorian Niemiec Date: Sat, 9 Mar 2024 16:10:41 +0100 Subject: [PATCH] Optimize HTTP/1.x compatiblity res.writeHead function --- svr.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/svr.js b/svr.js index 40734fd..252281a 100644 --- a/svr.js +++ b/svr.js @@ -2927,8 +2927,7 @@ if (!cluster.isPrimary) { if (typeof (b) == "object") table = b; if (table == undefined) table = this.tHeaders; table = JSON.parse(JSON.stringify(table)); - var tableKeysT = Object.keys(table); - tableKeysT.forEach(function (key) { + Object.keys(table).forEach(function (key) { var al = key.toLowerCase(); if (al == "transfer-encoding" || al == "connection" || al == "keep-alive" || al == "upgrade") delete table[key]; });