diff options
author | Alex Auvolat <alex@adnab.me> | 2020-12-05 19:23:46 +0100 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2020-12-05 19:23:46 +0100 |
commit | 4a5bbbb81088c9bd25bbe142f67daf4669b6538e (patch) | |
tree | 6dda907def43b63d0f44426ea44df29309e9ab24 /src/api/s3_get.rs | |
parent | dfbc280c37c6725f58224d2c0d31df9e4a9ff7b4 (diff) | |
download | garage-4a5bbbb81088c9bd25bbe142f67daf4669b6538e.tar.gz garage-4a5bbbb81088c9bd25bbe142f67daf4669b6538e.zip |
Propose ETag fixbug/etag
Diffstat (limited to 'src/api/s3_get.rs')
-rw-r--r-- | src/api/s3_get.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/api/s3_get.rs b/src/api/s3_get.rs index 43215923..1a23f476 100644 --- a/src/api/s3_get.rs +++ b/src/api/s3_get.rs @@ -24,10 +24,13 @@ fn object_headers( "Content-Type", version_meta.headers.content_type.to_string(), ) - .header("ETag", version_meta.etag.to_string()) .header("Last-Modified", date_str) .header("Accept-Ranges", format!("bytes")); + if !version_meta.etag.is_empty() { + resp = resp.header("ETag", format!("\"{}\"", version_meta.etag)); + } + for (k, v) in version_meta.headers.other.iter() { resp = resp.header(k, v.to_string()); } |