Skip to content

Commit

Permalink
Downcase content types
Browse files Browse the repository at this point in the history
  • Loading branch information
jnicklas committed Nov 20, 2018
1 parent 73dfd4d commit 8fe1daa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/body.rs
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ impl<T: 'static + Send + serde::Serialize> IntoResponse for Json<T> {
// TODO: think about how to handle errors
http::Response::builder()
.status(http::status::StatusCode::OK)
.header("Content-Type", "Application/json")
.header("Content-Type", "application/json")
.body(Body::from(serde_json::to_vec(&self.0).unwrap()))
.unwrap()
}
Expand Down Expand Up @@ -178,7 +178,7 @@ impl<T: 'static + Send + serde::Serialize> IntoResponse for Form<T> {
// TODO: think about how to handle errors
http::Response::builder()
.status(http::status::StatusCode::OK)
.header("Content-Type", "Application/x-www-form-urlencoded")
.header("Content-Type", "application/x-www-form-urlencoded")
.body(Body::from(
serde_qs::to_string(&self.0).unwrap().into_bytes(),
))
Expand Down

0 comments on commit 8fe1daa

Please sign in to comment.