aboutsummaryrefslogtreecommitdiff
path: root/src/api/s3_website.rs
diff options
context:
space:
mode:
authorJill <kokakiwi@deuxfleurs.fr>2022-01-17 10:55:31 +0100
committerAlex <alex@adnab.me>2022-01-17 10:55:31 +0100
commitb45dcc1925d76f3f7dcae7deea0391953ba548e5 (patch)
tree85600f90c41532dc0b50e395e6ea85ca8ba08f53 /src/api/s3_website.rs
parent60c0033c8bbd3dbc18f8c91f15674a60fd8acdc0 (diff)
downloadgarage-b45dcc1925d76f3f7dcae7deea0391953ba548e5.tar.gz
garage-b45dcc1925d76f3f7dcae7deea0391953ba548e5.zip
Support STREAMING-AWS4-HMAC-SHA256-PAYLOAD (#64) (#156)
Closes #64. Reviewed-on: https://git.deuxfleurs.fr/Deuxfleurs/garage/pulls/156 Co-authored-by: Jill <kokakiwi@deuxfleurs.fr> Co-committed-by: Jill <kokakiwi@deuxfleurs.fr>
Diffstat (limited to 'src/api/s3_website.rs')
-rw-r--r--src/api/s3_website.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/api/s3_website.rs b/src/api/s3_website.rs
index fcf8cba3..c4a43e2c 100644
--- a/src/api/s3_website.rs
+++ b/src/api/s3_website.rs
@@ -80,7 +80,10 @@ pub async fn handle_put_website(
content_sha256: Option<Hash>,
) -> Result<Response<Body>, Error> {
let body = hyper::body::to_bytes(req.into_body()).await?;
- verify_signed_content(content_sha256, &body[..])?;
+
+ if let Some(content_sha256) = content_sha256 {
+ verify_signed_content(content_sha256, &body[..])?;
+ }
let mut bucket = garage
.bucket_table