Fix Content-Type headers for {admin,k2v} errors and admin responses

Fix #315
This commit is contained in:
Alex Auvolat
2022-05-25 17:05:56 +02:00
parent 93eab8eaa3
commit ff06d3f082
8 changed files with 30 additions and 43 deletions
+3
View File
@@ -172,6 +172,9 @@ impl ApiError for Error {
fn add_http_headers(&self, header_map: &mut HeaderMap<HeaderValue>) {
use hyper::header;
header_map.append(header::CONTENT_TYPE, "application/xml".parse().unwrap());
#[allow(clippy::single_match)]
match self {
Error::InvalidRange((_, len)) => {