aboutsummaryrefslogtreecommitdiff
path: root/src/api/k2v
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/k2v
parent6e4229e29c1ee3e0b7f3511f80b6108e3beb1efd (diff)
downloadgarage-6e69a1fffc715c752a399750c1e26aa46683dbb2.tar.gz
garage-6e69a1fffc715c752a399750c1e26aa46683dbb2.zip
[dep-upgrade-202402] prepare migration to http/hyper 1.0
Diffstat (limited to 'src/api/k2v')
-rw-r--r--src/api/k2v/item.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/api/k2v/item.rs b/src/api/k2v/item.rs
index e13a0f30..33f4da53 100644
--- a/src/api/k2v/item.rs
+++ b/src/api/k2v/item.rs
@@ -3,7 +3,7 @@ use std::sync::Arc;
use base64::prelude::*;
use http::header;
-use hyper::{Body, Request, Response, StatusCode};
+use hyper::{body::HttpBody, Body, Request, Response, StatusCode};
use garage_util::data::*;
@@ -137,7 +137,8 @@ pub async fn handle_insert_item(
.map(CausalContext::parse_helper)
.transpose()?;
- let body = hyper::body::to_bytes(req.into_body()).await?;
+ let body = req.into_body().collect().await?.to_bytes();
+
let value = DvvsValue::Value(body.to_vec());
garage