diff --git a/actix-http/src/h1/big_bytes.rs b/actix-http/src/h1/big_bytes.rs index 63fb78f0..b845d917 100644 --- a/actix-http/src/h1/big_bytes.rs +++ b/actix-http/src/h1/big_bytes.rs @@ -47,8 +47,10 @@ impl BigBytes { self.frozen.push_back(current); } - self.frozen_len += bytes.len(); - self.frozen.push_back(bytes); + if !bytes.is_empty() { + self.frozen_len += bytes.len(); + self.frozen.push_back(bytes); + } } // Returns a slice of the frontmost buffer