diff --git a/TODO.md b/TODO.md index b8fa0f8..5218342 100644 --- a/TODO.md +++ b/TODO.md @@ -14,7 +14,6 @@ enabled), then converting them to mio tcp streams ## aquatic_http -* upper limit on request read buffer * check if connection ValidUntil's are really updated when necessary. there are some connections dropped after a while when load testing * add tests diff --git a/aquatic_http/src/lib/network/connection.rs b/aquatic_http/src/lib/network/connection.rs index 93e811a..aa6e6a0 100644 --- a/aquatic_http/src/lib/network/connection.rs +++ b/aquatic_http/src/lib/network/connection.rs @@ -46,7 +46,7 @@ impl EstablishedConnection { } pub fn read_request(&mut self) -> Result { - if self.buf.len() - self.bytes_read < 512 { + if (self.buf.len() - self.bytes_read < 512) & (self.buf.len() <= 3072){ self.buf.extend_from_slice(&[0; 1024]); }