From fbea4becceb947fbab5b9b7e2816c860e21154af Mon Sep 17 00:00:00 2001 From: marti-jorda-roca Date: Fri, 3 Mar 2023 10:32:02 +0100 Subject: [PATCH 1/2] merge requests dicts --- lib/aws-sigv4.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/aws-sigv4.js b/lib/aws-sigv4.js index 54c2707..726f4d8 100644 --- a/lib/aws-sigv4.js +++ b/lib/aws-sigv4.js @@ -102,9 +102,7 @@ const impl = { // Copy the headers from the AWS HttpRequest back to the Artillery requestParams. // This will now include the necessary Authorization header needed for AWS. - for (header in request.headers) { - requestParams.headers[header] = request.headers[header] - } + requestParams.headers = Object.assign({}, requestParams.headers, req.headers); // Allow Artillery to continue. callback() From 8dd1abc8df9f65311fe729b76a3ec6401d8968a9 Mon Sep 17 00:00:00 2001 From: marti-jorda-roca Date: Fri, 3 Mar 2023 10:47:55 +0100 Subject: [PATCH 2/2] correct request var name --- lib/aws-sigv4.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/aws-sigv4.js b/lib/aws-sigv4.js index 726f4d8..8972844 100644 --- a/lib/aws-sigv4.js +++ b/lib/aws-sigv4.js @@ -102,7 +102,7 @@ const impl = { // Copy the headers from the AWS HttpRequest back to the Artillery requestParams. // This will now include the necessary Authorization header needed for AWS. - requestParams.headers = Object.assign({}, requestParams.headers, req.headers); + requestParams.headers = Object.assign({}, requestParams.headers, request.headers); // Allow Artillery to continue. callback()