1
0
mirror of https://github.com/actix/actix-extras.git synced 2024-12-01 02:44:37 +01:00

fix compression

This commit is contained in:
Nikolay Kim 2017-12-21 12:54:18 -08:00
parent 18f3841783
commit c35d294611

View File

@ -394,7 +394,8 @@ impl PayloadEncoder {
}, },
Body::Binary(ref mut bytes) => { Body::Binary(ref mut bytes) => {
if compression { if compression {
let transfer = TransferEncoding::eof(SharedBytes::default()); let mut buf = SharedBytes::default();
let transfer = TransferEncoding::eof(buf.clone());
let mut enc = match encoding { let mut enc = match encoding {
ContentEncoding::Deflate => ContentEncoder::Deflate( ContentEncoding::Deflate => ContentEncoder::Deflate(
DeflateEncoder::new(transfer, Compression::Default)), DeflateEncoder::new(transfer, Compression::Default)),