diff --git a/src/DecoderPlugin.php b/src/DecoderPlugin.php index 27a37c2..11f19a8 100644 --- a/src/DecoderPlugin.php +++ b/src/DecoderPlugin.php @@ -52,9 +52,9 @@ public function __construct(array $config = []) */ public function handleRequest(RequestInterface $request, callable $next, callable $first) { - $encodings = extension_loaded('zlib') ? ['gzip', 'deflate', 'compress'] : []; + $encodings = extension_loaded('zlib') ? ['gzip', 'deflate', 'compress'] : ['identity']; - if ($this->useContentEncoding && count($encodings)) { + if ($this->useContentEncoding) { $request = $request->withHeader('Accept-Encoding', $encodings); } $encodings[] = 'chunked';