refactor: HttpSignatureSignerImplをリファクタリング

This commit is contained in:
usbharu 2023-10-14 10:10:21 +09:00
parent 4ca5132183
commit 468b318daa
1 changed files with 2 additions and 2 deletions

View File

@ -55,13 +55,13 @@ class HttpSignatureSignerImpl : HttpSignatureSigner {
signHeaders: List<String>
): String {
headers.toMap().map { it.key.lowercase() to it.value }.toMap()
val result = signHeaders.map {
val result = signHeaders.joinToString("\n") {
if (it.startsWith("(")) {
specialHeader(it, url, method)
} else {
generalHeader(it, headers.get(it)!!)
}
}.joinToString("\n")
}
return result
}