aboutsummaryrefslogtreecommitdiff
path: root/src/api/s3/router.rs
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/api/s3/router.rs
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/api/s3/router.rs')
-rw-r--r--src/api/s3/router.rs21
1 files changed, 20 insertions, 1 deletions
diff --git a/src/api/s3/router.rs b/src/api/s3/router.rs
index 05882885..e7ac1d77 100644
--- a/src/api/s3/router.rs
+++ b/src/api/s3/router.rs
@@ -125,6 +125,12 @@ pub enum Endpoint {
key: String,
part_number: Option<u64>,
version_id: Option<String>,
+ response_cache_control: Option<String>,
+ response_content_disposition: Option<String>,
+ response_content_encoding: Option<String>,
+ response_content_language: Option<String>,
+ response_content_type: Option<String>,
+ response_expires: Option<String>,
},
GetObjectAcl {
key: String,
@@ -358,7 +364,14 @@ impl Endpoint {
(query.keyword.take().unwrap_or_default(), key, query, None),
key: [
EMPTY if upload_id => ListParts (query::upload_id, opt_parse::max_parts, opt_parse::part_number_marker),
- EMPTY => GetObject (query_opt::version_id, opt_parse::part_number),
+ EMPTY => GetObject (query_opt::version_id,
+ opt_parse::part_number,
+ query_opt::response_cache_control,
+ query_opt::response_content_disposition,
+ query_opt::response_content_encoding,
+ query_opt::response_content_language,
+ query_opt::response_content_type,
+ query_opt::response_expires),
ACL => GetObjectAcl (query_opt::version_id),
LEGAL_HOLD => GetObjectLegalHold (query_opt::version_id),
RETENTION => GetObjectRetention (query_opt::version_id),
@@ -671,6 +684,12 @@ generateQueryParameters! {
"partNumber" => part_number,
"part-number-marker" => part_number_marker,
"prefix" => prefix,
+ "response-cache-control" => response_cache_control,
+ "response-content-disposition" => response_content_disposition,
+ "response-content-encoding" => response_content_encoding,
+ "response-content-language" => response_content_language,
+ "response-content-type" => response_content_type,
+ "response-expires" => response_expires,
"select-type" => select_type,
"start-after" => start_after,
"uploadId" => upload_id,