diff --git a/lib/src/rocket.rs b/lib/src/rocket.rs index 52f276a39d..25bd9dbb03 100644 --- a/lib/src/rocket.rs +++ b/lib/src/rocket.rs @@ -159,7 +159,7 @@ impl Rocket { let mut buffer = vec![0; chunk_size as usize]; let mut stream = hyp_res.start()?; loop { - match body.read_max(&mut buffer)? { + match body.read(&mut buffer)? { 0 => break, n => stream.write_all(&buffer[..n])?, }