Class HeaderTransformsHelper
java.lang.Object
software.amazon.awssdk.auth.signer.internal.util.HeaderTransformsHelper
Helper class for transforming headers required during signing of headers.
-
Method Summary
Modifier and TypeMethodDescriptioncanonicalizeSigningHeaders
(Map<String, List<String>> headers) static String
getCanonicalizedHeaderString
(Map<String, List<String>> canonicalizedHeaders) static String
"The Trimall function removes excess white space before and after values, and converts sequential spaces to a single space."
-
Method Details
-
canonicalizeSigningHeaders
-
trimAll
"The Trimall function removes excess white space before and after values, and converts sequential spaces to a single space."https://docs.aws.amazon.com/general/latest/gr/sigv4-create-canonical-request.html
The collapse-whitespace logic is equivalent to:
value.replaceAll("\\s+", " ")
but does not create a Pattern object that needs to compile the match string; it also prevents us from having to make a Matcher object as well. -
getCanonicalizedHeaderString
-