From b318d7cbcded2c6dfc66bbe19687f1246a9a9eab Mon Sep 17 00:00:00 2001 From: Shritesh Bhattarai Date: Tue, 15 Jun 2021 09:45:19 -0400 Subject: Support rocket 0.5.0-rc.1 based on @flo-l's PR (#495) See #412 for earlier iteration. --- askama_rocket/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'askama_rocket/src') diff --git a/askama_rocket/src/lib.rs b/askama_rocket/src/lib.rs index 6db3b7b..ee70965 100644 --- a/askama_rocket/src/lib.rs +++ b/askama_rocket/src/lib.rs @@ -11,6 +11,6 @@ pub fn respond(t: &T, ext: &str) -> Result<'static> { let ctype = ContentType::from_extension(ext).ok_or(Status::InternalServerError)?; Response::build() .header(ctype) - .sized_body(Cursor::new(rsp)) + .sized_body(rsp.len(), Cursor::new(rsp)) .ok() } -- cgit