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
|
|
@ -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