aboutsummaryrefslogtreecommitdiff
path: root/src/web
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2024-02-05 19:27:12 +0100
committerAlex Auvolat <alex@adnab.me>2024-02-05 19:27:12 +0100
commita22bd319202f05bce4ad13072238c7ba81d518fb (patch)
tree817d90efaeaa51ea8aebaf5b25ad56c8b968dc0c /src/web
parent0bb5b77530ad432e4c77f13b395fe74613812337 (diff)
downloadgarage-a22bd319202f05bce4ad13072238c7ba81d518fb.tar.gz
garage-a22bd319202f05bce4ad13072238c7ba81d518fb.zip
[dep-upgrade-202402] migration to http/hyper 1.0 for k2v api
Diffstat (limited to 'src/web')
-rw-r--r--src/web/web_server.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/web/web_server.rs b/src/web/web_server.rs
index ce438469..668a897a 100644
--- a/src/web/web_server.rs
+++ b/src/web/web_server.rs
@@ -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")),