Skip to content

Commit

Permalink
Make default extension ".txt" for TemplateResponder
Browse files Browse the repository at this point in the history
  • Loading branch information
zizhengtai authored and djc committed Feb 20, 2019
1 parent bf9e7cc commit 4c4d09e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion askama/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -502,7 +502,7 @@ pub mod actix_web {
let rsp = self
.render()
.map_err(|_| ErrorInternalServerError("Template render error"))?;
let ext = T::extension().unwrap_or("");
let ext = T::extension().unwrap_or("txt");
let ctype = get_mime_type(ext).to_string();
Ok(HttpResponse::Ok().content_type(ctype.as_str()).body(rsp))
}
Expand Down

0 comments on commit 4c4d09e

Please sign in to comment.