aboutsummaryrefslogtreecommitdiff
path: root/src/api/signature/payload.rs
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2024-03-07 14:00:34 +0100
committerAlex Auvolat <alex@adnab.me>2024-03-07 14:00:34 +0100
commitfe2dc5d51c206c21ab15d9cc93fa1d1c52d95c46 (patch)
treebacc1f89ad2abaf6e5ff586694b4371921654861 /src/api/signature/payload.rs
parent603604cdfc76d9ae86c02f25d49b7c845d138262 (diff)
parentafee8c2207e2c79975734f1c1fea41b8b942aaa4 (diff)
downloadgarage-fe2dc5d51c206c21ab15d9cc93fa1d1c52d95c46.tar.gz
garage-fe2dc5d51c206c21ab15d9cc93fa1d1c52d95c46.zip
Merge branch 'main' into next-0.10
Diffstat (limited to 'src/api/signature/payload.rs')
-rw-r--r--src/api/signature/payload.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/api/signature/payload.rs b/src/api/signature/payload.rs
index d72736bb..d6ff62f0 100644
--- a/src/api/signature/payload.rs
+++ b/src/api/signature/payload.rs
@@ -331,8 +331,8 @@ pub fn canonical_request(
.map(|name| {
let value = headers
.get(name)
- .ok_or_bad_request(format!("signed header `{}` is not present", name))?
- .to_str()?;
+ .ok_or_bad_request(format!("signed header `{}` is not present", name))?;
+ let value = std::str::from_utf8(value.as_bytes())?;
Ok(format!("{}:{}", name.as_str(), value.trim()))
})
.collect::<Result<Vec<String>, Error>>()?