aboutsummaryrefslogtreecommitdiff
path: root/src/web
diff options
context:
space:
mode:
authorAlex <alex@adnab.me>2024-02-09 15:40:18 +0000
committerAlex <alex@adnab.me>2024-02-09 15:40:18 +0000
commit198188017cc7b956885e4b51c979cb3554276e4f (patch)
tree1aa2708656b02a856b3efd7e4d1c985c91c866ae /src/web
parentfe175fa8e2b7f8d2f719642b801d4ee101cb3289 (diff)
parent02e98e2d100a6af96369a72bc6979580424fe7df (diff)
downloadgarage-198188017cc7b956885e4b51c979cb3554276e4f.tar.gz
garage-198188017cc7b956885e4b51c979cb3554276e4f.zip
Merge pull request 'Implement header overriding in GetObject (fix #650)' (#713) from header-override-650 into main
Reviewed-on: https://git.deuxfleurs.fr/Deuxfleurs/garage/pulls/713
Diffstat (limited to 'src/web')
-rw-r--r--src/web/web_server.rs22
1 files changed, 20 insertions, 2 deletions
diff --git a/src/web/web_server.rs b/src/web/web_server.rs
index 269f37f2..0f9b5dc8 100644
--- a/src/web/web_server.rs
+++ b/src/web/web_server.rs
@@ -247,7 +247,17 @@ impl WebServer {
.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,
+ Method::GET => {
+ handle_get(
+ self.garage.clone(),
+ &req,
+ bucket_id,
+ &key,
+ None,
+ Default::default(),
+ )
+ .await
+ }
_ => Err(ApiError::bad_request("HTTP method not supported")),
};
@@ -291,7 +301,15 @@ impl WebServer {
.body(empty_body::<Infallible>())
.unwrap();
- match handle_get(self.garage.clone(), &req2, bucket_id, &error_document, None).await
+ match handle_get(
+ self.garage.clone(),
+ &req2,
+ bucket_id,
+ &error_document,
+ None,
+ Default::default(),
+ )
+ .await
{
Ok(mut error_doc) => {
// The error won't be logged back in handle_request,