aboutsummaryrefslogtreecommitdiffstats
path: root/askama_gotham/src
diff options
context:
space:
mode:
Diffstat (limited to 'askama_gotham/src')
-rw-r--r--askama_gotham/src/lib.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/askama_gotham/src/lib.rs b/askama_gotham/src/lib.rs
index 1241c9c..c2c933d 100644
--- a/askama_gotham/src/lib.rs
+++ b/askama_gotham/src/lib.rs
@@ -8,13 +8,13 @@ pub use gotham::handler::IntoResponse;
pub use gotham::state::State;
pub use hyper::{Body, Response, StatusCode};
-pub fn respond<T: Template>(t: &T, ext: &str) -> Response<Body> {
+pub fn respond<T: Template>(t: &T, _ext: &str) -> Response<Body> {
match t.render() {
Ok(body) => Response::builder()
.status(StatusCode::OK)
.header(
- "content-type",
- mime::extension_to_mime_type(ext).to_string(),
+ hyper::header::CONTENT_TYPE,
+ hyper::header::HeaderValue::from_static(T::MIME_TYPE),
)
.body(body.into())
.unwrap(),