diff options
author | Shritesh Bhattarai <shritesh@shritesh.com> | 2021-06-15 09:45:19 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-15 15:45:19 +0200 |
commit | b318d7cbcded2c6dfc66bbe19687f1246a9a9eab (patch) | |
tree | af453e71287c9fdc8530526609b3c3c4bf3c32fa /askama_rocket/src/lib.rs | |
parent | 25eae265a2d14a33a1723bfa0c5dc7a7f6b5a6ab (diff) | |
download | askama-b318d7cbcded2c6dfc66bbe19687f1246a9a9eab.tar.gz askama-b318d7cbcded2c6dfc66bbe19687f1246a9a9eab.tar.bz2 askama-b318d7cbcded2c6dfc66bbe19687f1246a9a9eab.zip |
Support rocket 0.5.0-rc.1 based on @flo-l's PR (#495)
See #412 for earlier iteration.
Diffstat (limited to 'askama_rocket/src/lib.rs')
-rw-r--r-- | askama_rocket/src/lib.rs | 2 |
1 files changed, 1 insertions, 1 deletions
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: Template>(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() } |