[dep-upgrade-202402] migration to http/hyper 1.0 for k2v api

This commit is contained in:
Alex Auvolat
2024-02-05 19:27:12 +01:00
parent 0bb5b77530
commit a22bd31920
16 changed files with 131 additions and 138 deletions
+3 -1
View File
@@ -280,7 +280,9 @@ impl WebServer {
);
let ret_doc = match *req.method() {
Method::OPTIONS => handle_options_for_bucket(req, &bucket),
Method::OPTIONS => handle_options_for_bucket(req, &bucket)
.map_err(ApiError::from)
.map(|res| res.map(|_empty_body: EmptyBody| empty_body())),
Method::HEAD => handle_head(self.garage.clone(), &req, bucket_id, &key, None).await,
Method::GET => handle_get(self.garage.clone(), &req, bucket_id, &key, None).await,
_ => Err(ApiError::bad_request("HTTP method not supported")),