mirror of
https://github.com/YGGverse/aquatic.git
synced 2026-03-31 17:55:36 +00:00
aquatic_http: add upper limit on request read buffer
This commit is contained in:
parent
9062baef81
commit
e7de66603e
2 changed files with 1 additions and 2 deletions
1
TODO.md
1
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
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ impl EstablishedConnection {
|
|||
}
|
||||
|
||||
pub fn read_request(&mut self) -> Result<Request, RequestReadError> {
|
||||
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]);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue