aboutsummaryrefslogtreecommitdiff
path: root/src/api/generic_server.rs
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2022-05-25 17:05:56 +0200
committerAlex Auvolat <alex@adnab.me>2022-05-25 17:09:33 +0200
commitff06d3f0829464863e64ed55471f2caa13bed191 (patch)
tree2ba08f439721c28d326badc0a33f148ee1fbdce1 /src/api/generic_server.rs
parent93eab8eaa3927b99626fee4a747a0f9f041cafdb (diff)
downloadgarage-ff06d3f0829464863e64ed55471f2caa13bed191.tar.gz
garage-ff06d3f0829464863e64ed55471f2caa13bed191.zip
Fix Content-Type headers for {admin,k2v} errors and admin responsesfix/admin-api-content-type
Fix #315
Diffstat (limited to 'src/api/generic_server.rs')
-rw-r--r--src/api/generic_server.rs4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/api/generic_server.rs b/src/api/generic_server.rs
index 77278908..a48be1bc 100644
--- a/src/api/generic_server.rs
+++ b/src/api/generic_server.rs
@@ -150,9 +150,7 @@ impl<A: ApiHandler> ApiServer<A> {
}
Err(e) => {
let body: Body = e.http_body(&self.region, uri.path());
- let mut http_error_builder = Response::builder()
- .status(e.http_status_code())
- .header("Content-Type", "application/xml");
+ let mut http_error_builder = Response::builder().status(e.http_status_code());
if let Some(header_map) = http_error_builder.headers_mut() {
e.add_http_headers(header_map)