diff options
author | Alex Auvolat <alex@adnab.me> | 2024-02-09 15:34:42 +0100 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2024-02-09 15:58:46 +0100 |
commit | 02e98e2d100a6af96369a72bc6979580424fe7df (patch) | |
tree | da13072233d0da8f869d2c839fb486ce30e4b8cf /src/api/s3/router.rs | |
parent | 3865080c354427f913de6f2bb5e5b03f6231751c (diff) | |
download | garage-02e98e2d100a6af96369a72bc6979580424fe7df.tar.gz garage-02e98e2d100a6af96369a72bc6979580424fe7df.zip |
[header-override-650] implement header overriding in GetObject (fix #650)header-override-650
Diffstat (limited to 'src/api/s3/router.rs')
-rw-r--r-- | src/api/s3/router.rs | 21 |
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, |