mirror of https://github.com/rwf2/Rocket.git
NamedFile use sized_body instead of streamed_body
This commit is contained in:
parent
aad97e6be0
commit
61e386950d
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue