From eaab28cd3b30c49bf1daa071d4faee09bd0474e1 Mon Sep 17 00:00:00 2001 From: Nikolay Kim Date: Thu, 21 Dec 2017 12:57:59 -0800 Subject: [PATCH] proper fix for compression --- src/encoding.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/encoding.rs b/src/encoding.rs index 4e9427999..291cb8e6e 100644 --- a/src/encoding.rs +++ b/src/encoding.rs @@ -410,7 +410,7 @@ impl PayloadEncoder { let _ = enc.write(bytes.as_ref()); let _ = enc.write_eof(); - *bytes = Binary::from(enc.get_mut().take()); + *bytes = Binary::from(buf.get_mut().take()); encoding = ContentEncoding::Identity; } resp.headers_mut().remove(CONTENT_LENGTH);