From f96845a96396ae50265c0c03f6466769cd9c26ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabio=20Jos=C3=A9?= Date: Tue, 25 Jun 2019 10:52:27 -0300 Subject: [PATCH] Fix the sanity logic MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Fabio José --- lib/bindings/http/commons.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/bindings/http/commons.js b/lib/bindings/http/commons.js index 5b7dd60..e7e9a23 100644 --- a/lib/bindings/http/commons.js +++ b/lib/bindings/http/commons.js @@ -1,8 +1,9 @@ function sanity_and_clone(headers) { - var sanity_headers = JSON.parse(JSON.stringify(headers)); + //var sanity_headers = JSON.parse(JSON.stringify(headers)); + var sanity_headers = {}; - for(header in sanity_headers){ - sanity_headers[header.toLowerCase()] = sanity_headers[header]; + for(header in headers){ + sanity_headers[header.toLowerCase()] = headers[header]; } return sanity_headers;