aboutsummaryrefslogtreecommitdiff
path: root/src/api/s3/bucket.rs
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2024-02-05 14:44:12 +0100
committerAlex Auvolat <alex@adnab.me>2024-02-05 14:44:12 +0100
commit6e69a1fffc715c752a399750c1e26aa46683dbb2 (patch)
treed1539c6107372f14aa6ca09255977df69411a553 /src/api/s3/bucket.rs
parent6e4229e29c1ee3e0b7f3511f80b6108e3beb1efd (diff)
downloadgarage-6e69a1fffc715c752a399750c1e26aa46683dbb2.tar.gz
garage-6e69a1fffc715c752a399750c1e26aa46683dbb2.zip
[dep-upgrade-202402] prepare migration to http/hyper 1.0
Diffstat (limited to 'src/api/s3/bucket.rs')
-rw-r--r--src/api/s3/bucket.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/api/s3/bucket.rs b/src/api/s3/bucket.rs
index 733981e1..a2437524 100644
--- a/src/api/s3/bucket.rs
+++ b/src/api/s3/bucket.rs
@@ -1,7 +1,7 @@
use std::collections::HashMap;
use std::sync::Arc;
-use hyper::{Body, Request, Response, StatusCode};
+use hyper::{body::HttpBody, Body, Request, Response, StatusCode};
use garage_model::bucket_alias_table::*;
use garage_model::bucket_table::Bucket;
@@ -119,7 +119,7 @@ pub async fn handle_create_bucket(
api_key: Key,
bucket_name: String,
) -> Result<Response<Body>, Error> {
- let body = hyper::body::to_bytes(req.into_body()).await?;
+ let body = req.into_body().collect().await?.to_bytes();
if let Some(content_sha256) = content_sha256 {
verify_signed_content(content_sha256, &body[..])?;