From bbea9755cc84d7b9dceeea4e4214a248018948be Mon Sep 17 00:00:00 2001 From: Erik Pellizzon Date: Mon, 23 Dec 2024 14:42:41 +0100 Subject: [PATCH] Fix errors --- doc.go | 2 +- internal/signer/signer.go | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/doc.go b/doc.go index 28b1ba07..1ba20bf3 100644 --- a/doc.go +++ b/doc.go @@ -23,7 +23,7 @@ Adding a header to each request return r, nil }) -# Note that the function is called before the proxy sends the request to the server +> Note that the function is called before the proxy sends the request to the server For printing the content type of all incoming responses diff --git a/internal/signer/signer.go b/internal/signer/signer.go index f32eeb5a..6435d93a 100644 --- a/internal/signer/signer.go +++ b/internal/signer/signer.go @@ -15,6 +15,7 @@ import ( "net" "runtime" "sort" + "strings" "time" ) @@ -25,9 +26,7 @@ func hashSorted(lst []string) []byte { copy(c, lst) sort.Strings(c) h := sha256.New() - for _, s := range c { - h.Write([]byte(s + ",")) - } + h.Write([]byte(strings.Join(c, ","))) return h.Sum(nil) }