From 989cd61236cc3a766221cfaa6a8b0dd660fcba83 Mon Sep 17 00:00:00 2001 From: Nikolay Kim Date: Sun, 24 Jun 2018 10:59:01 +0600 Subject: [PATCH] handle empty te --- src/server/output.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/server/output.rs b/src/server/output.rs index 7908dd38..e84b55b8 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()) }