diff options
author | Quentin <quentin@deuxfleurs.fr> | 2020-12-10 20:12:56 +0100 |
---|---|---|
committer | Quentin <quentin@deuxfleurs.fr> | 2020-12-10 20:12:56 +0100 |
commit | e8c12072cefa37d9aec023fd6087b2d190ee3e4c (patch) | |
tree | 88b15bfe703d2454d99550010ad04934513d25a4 /src/api/s3_get.rs | |
parent | 51d0c14e440f00f24dbed6c3bce915a183a2bb65 (diff) | |
parent | 022b386a5085cad79d649a82846c41cad730920b (diff) | |
download | garage-e8c12072cefa37d9aec023fd6087b2d190ee3e4c.tar.gz garage-e8c12072cefa37d9aec023fd6087b2d190ee3e4c.zip |
Merge branch 'master' into feature/website
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()); } |