diff --git a/actix-http/CHANGES.md b/actix-http/CHANGES.md
index cc695fa6..4b53161a 100644
--- a/actix-http/CHANGES.md
+++ b/actix-http/CHANGES.md
@@ -1,5 +1,11 @@
 # Changes
 
+## [0.2.8] - 2019-07-xx
+
+### Fixed
+
+* Invalid response with compression middleware enabled, but compression-related features disabled #997
+
 ## [0.2.7] - 2019-07-18
 
 ### Added
diff --git a/actix-http/src/encoding/encoder.rs b/actix-http/src/encoding/encoder.rs
index fa95d798..58d8a2d9 100644
--- a/actix-http/src/encoding/encoder.rs
+++ b/actix-http/src/encoding/encoder.rs
@@ -54,22 +54,24 @@ impl<B: MessageBody> Encoder<B> {
         };
 
         if can_encode {
-            update_head(encoding, head);
-            head.no_chunking(false);
-            ResponseBody::Body(Encoder {
-                body,
-                eof: false,
-                fut: None,
-                encoder: ContentEncoder::encoder(encoding),
-            })
-        } else {
-            ResponseBody::Body(Encoder {
-                body,
-                eof: false,
-                fut: None,
-                encoder: None,
-            })
+            // Modify response body only if encoder is not None
+            if let Some(enc) = ContentEncoder::encoder(encoding) {
+                update_head(encoding, head);
+                head.no_chunking(false);
+                return ResponseBody::Body(Encoder {
+                    body,
+                    eof: false,
+                    fut: None,
+                    encoder: Some(enc),
+                });
+            }
         }
+        ResponseBody::Body(Encoder {
+            body,
+            eof: false,
+            fut: None,
+            encoder: None,
+        })
     }
 }