NamedFile use sized_body instead of streamed_body

This commit is contained in:
Wilson Birney 2017-11-27 17:18:42 -05:00
parent aad97e6be0
commit 61e386950d
1 changed files with 2 additions and 2 deletions

View File

@ -1,6 +1,6 @@
use std::fs::File;
use std::path::{Path, PathBuf};
use std::io::{self, BufReader};
use std::io;
use std::ops::{Deref, DerefMut};
use request::Request;
@ -88,7 +88,7 @@ impl Responder<'static> for NamedFile {
}
}
response.set_streamed_body(BufReader::new(self.take_file()));
response.set_sized_body(self.take_file());
Ok(response)
}
}