Merge pull request 'add support for caching headers' (#49) from trinity-1686a/garage:cache-headers into master

Reviewed-on: https://git.deuxfleurs.fr/Deuxfleurs/garage/pulls/49
This commit is contained in:
Alex
2021-03-18 19:45:02 +01:00
3 changed files with 46 additions and 3 deletions
+1 -1
View File
@@ -99,7 +99,7 @@ async fn serve_file(garage: Arc<Garage>, req: Request<Body>) -> Result<Response<
info!("Selected bucket: \"{}\", selected key: \"{}\"", bucket, key);
let res = match req.method() {
&Method::HEAD => handle_head(garage, &bucket, &key).await?,
&Method::HEAD => handle_head(garage, &req, &bucket, &key).await?,
&Method::GET => handle_get(garage, &req, bucket, &key).await?,
_ => return Err(Error::BadRequest(format!("HTTP method not supported"))),
};