From a0e47d963556e31380c6a475568449ceb843b70a Mon Sep 17 00:00:00 2001 From: Bogdan Sorlea Date: Mon, 28 Nov 2016 15:31:55 +0100 Subject: [PATCH] Allow ampersands and colons in key names --- .gitignore | 5 +++++ sign.go | 3 +++ 2 files changed, 8 insertions(+) diff --git a/.gitignore b/.gitignore index 14741e7..e9c39f4 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,8 @@ *.mprof *.out .env +.idea +out +*.iml +gof3r/gof3r + diff --git a/sign.go b/sign.go index cc158c8..dfd4e9e 100644 --- a/sign.go +++ b/sign.go @@ -125,6 +125,9 @@ func (s *signer) buildCanonicalString() { uri = "/" } + uri = strings.Replace(uri, "@", "%40", -1) + uri = strings.Replace(uri, ":", "%3A", -1) + s.canonicalString = strings.Join([]string{ s.Request.Method, uri,