diff --git a/src/server/output.rs b/src/server/output.rs index 7908dd38e..e84b55b8b 100644 --- a/src/server/output.rs +++ b/src/server/output.rs @@ -644,7 +644,9 @@ impl TransferEncoding { impl io::Write for TransferEncoding { #[inline] fn write(&mut self, buf: &[u8]) -> io::Result { - self.encode(buf)?; + if self.buf.is_some() { + self.encode(buf)?; + } Ok(buf.len()) }