aboutsummaryrefslogtreecommitdiff
path: root/src/api/s3_copy.rs
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2021-02-19 23:40:18 +0100
committerAlex Auvolat <alex@adnab.me>2021-02-19 23:40:18 +0100
commit1de96248e0e4aae27995eb08e9019842b327d1a3 (patch)
tree45c3c19a6bcccc7fb8b8674f23e2b4d4301b1e58 /src/api/s3_copy.rs
parent0ddfee92c5f1787d452a04ea0b7620bdf95df761 (diff)
downloadgarage-1de96248e0e4aae27995eb08e9019842b327d1a3.tar.gz
garage-1de96248e0e4aae27995eb08e9019842b327d1a3.zip
add application/xml header and missing xml escapes
Diffstat (limited to 'src/api/s3_copy.rs')
-rw-r--r--src/api/s3_copy.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/api/s3_copy.rs b/src/api/s3_copy.rs
index 5997e4fe..d764f7a8 100644
--- a/src/api/s3_copy.rs
+++ b/src/api/s3_copy.rs
@@ -103,5 +103,7 @@ pub async fn handle_copy(
writeln!(&mut xml, "\t<LastModified>{}</LastModified>", last_modified).unwrap();
writeln!(&mut xml, "</CopyObjectResult>").unwrap();
- Ok(Response::new(Body::from(xml.into_bytes())))
+ Ok(Response::builder()
+ .header("Content-Type", "application/xml")
+ .body(Body::from(xml.into_bytes()))?)
}