Skip to content

Commit 83cd488

Browse files
committed
Rust update: TcpStream::read_bytes -> TcpStream::read_exact
1 parent 244d772 commit 83cd488

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/http/server/request.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,7 @@ impl Request {
372372
// Read body if its length is specified
373373
match request.headers.content_length {
374374
Some(length) => {
375-
match buffer.read_bytes(length) {
375+
match buffer.read_exact(length) {
376376
Ok(body) => match str::from_utf8(body) {
377377
Some(body_str) => request.body = body_str.to_owned(),
378378
None => return (request, Err(status::BadRequest))

0 commit comments

Comments
 (0)