1
0
mirror of https://github.com/actix/actix-extras.git synced 2024-11-28 09:42:40 +01:00

handle empty te

This commit is contained in:
Nikolay Kim 2018-06-24 10:59:01 +06:00
parent 33260c7b35
commit 989cd61236

View File

@ -644,7 +644,9 @@ impl TransferEncoding {
impl io::Write for TransferEncoding { impl io::Write for TransferEncoding {
#[inline] #[inline]
fn write(&mut self, buf: &[u8]) -> io::Result<usize> { fn write(&mut self, buf: &[u8]) -> io::Result<usize> {
if self.buf.is_some() {
self.encode(buf)?; self.encode(buf)?;
}
Ok(buf.len()) Ok(buf.len())
} }