diff --git a/autorest/authorization_storage.go b/autorest/authorization_storage.go index 2af5030a1..c58d7b7b8 100644 --- a/autorest/authorization_storage.go +++ b/autorest/authorization_storage.go @@ -190,7 +190,7 @@ func buildCanonicalizedResource(accountName, uri string, keyType SharedKeyType) } } - return string(cr.Bytes()), nil + return cr.String(), nil } func getCanonicalizedAccountName(accountName string) string { @@ -289,7 +289,7 @@ func buildCanonicalizedHeader(headers http.Header) string { ch.WriteRune('\n') } - return strings.TrimSuffix(string(ch.Bytes()), "\n") + return strings.TrimSuffix(ch.String(), "\n") } func createAuthorizationHeader(accountName string, accountKey []byte, canonicalizedString string, keyType SharedKeyType) string {