aboutsummaryrefslogtreecommitdiff
path: root/src/web/web_server.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/web/web_server.rs')
-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")),