Blob Blame History Raw
From 7fc934968f405459774a4c55bae0a427ca714c4f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Robert-Andr=C3=A9=20Mauchin?= <zebob.m@gmail.com>
Date: Thu, 23 Jul 2020 19:39:02 +0200
Subject: [PATCH] Convert id to string using strconv.Itoa
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Fix #655.

Signed-off-by: Robert-André Mauchin <zebob.m@gmail.com>
---
 aws/signer/v2/v2_test.go | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/aws/signer/v2/v2_test.go b/aws/signer/v2/v2_test.go
index 3b0d08ad..32b96da6 100644
--- a/aws/signer/v2/v2_test.go
+++ b/aws/signer/v2/v2_test.go
@@ -6,6 +6,7 @@ import (
 	"net/http"
 	"net/url"
 	"os"
+    "strconv"
 	"testing"
 	"time"
 
@@ -31,7 +32,7 @@ func (sb signerBuilder) BuildSigner() signer {
 		reader := bytes.NewReader(body)
 		req, _ = http.NewRequest(sb.Method, endpoint, reader)
 		req.Header.Add("Content-Type", "application/x-www-form-urlencoded")
-		req.Header.Add("Content-Length", string(len(body)))
+		req.Header.Add("Content-Length", strconv.Itoa(len(body)))
 	} else {
 		req, _ = http.NewRequest(sb.Method, endpoint, nil)
 		req.URL.RawQuery = sb.Query.Encode()
-- 
2.26.2