add application/xml header and missing xml escapes

This commit is contained in:
Alex Auvolat
2021-02-19 23:40:18 +01:00
parent 0ddfee92c5
commit 1de96248e0
3 changed files with 11 additions and 5 deletions
+3 -1
View File
@@ -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()))?)
}