From 4c4d09ef1a2bb59ab9c5854cde60ab789a3da934 Mon Sep 17 00:00:00 2001 From: Zizheng Tai Date: Sat, 26 Jan 2019 22:44:48 -0800 Subject: Make default extension ".txt" for TemplateResponder --- askama/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)) } -- cgit