Class HeaderTransformsHelper
- java.lang.Object
-
- software.amazon.awssdk.auth.signer.internal.util.HeaderTransformsHelper
-
public final class HeaderTransformsHelper extends Object
Helper class for transforming headers required during signing of headers.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Map<String,List<String>>
canonicalizeSigningHeaders(Map<String,List<String>> headers)
static String
getCanonicalizedHeaderString(Map<String,List<String>> canonicalizedHeaders)
static String
trimAll(String value)
"The Trimall function removes excess white space before and after values, and converts sequential spaces to a single space."
-
-
-
Method Detail
-
canonicalizeSigningHeaders
public static Map<String,List<String>> canonicalizeSigningHeaders(Map<String,List<String>> headers)
-
trimAll
public static String trimAll(String value)
"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.
-
-