aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar Zizheng Tai <zizheng.tai@gmail.com>2019-01-26 22:44:48 -0800
committerLibravatar Dirkjan Ochtman <dirkjan@ochtman.nl>2019-02-20 16:18:23 +0100
commit4c4d09ef1a2bb59ab9c5854cde60ab789a3da934 (patch)
treed80994a90450a8d25352fe28986d5103977ea0f6
parentbf9e7cc049d7a16cdd3718df82870bf5cc4809b9 (diff)
downloadaskama-4c4d09ef1a2bb59ab9c5854cde60ab789a3da934.tar.gz
askama-4c4d09ef1a2bb59ab9c5854cde60ab789a3da934.tar.bz2
askama-4c4d09ef1a2bb59ab9c5854cde60ab789a3da934.zip
Make default extension ".txt" for TemplateResponder
Diffstat (limited to '')
-rw-r--r--askama/src/lib.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/askama/src/lib.rs b/askama/src/lib.rs
index 1d66feb..2e69dfd 100644
--- a/askama/src/lib.rs
+++ b/askama/src/lib.rs
@@ -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))
}