zendframework/zf2 — pull request #4555 by weierophinney (2013-07-22 21:43:01+00:00)
Title: Zend\Http\Response::getBody() tries to decode gzip that has already been decoded by cURL

When performing a HTTP request to a gzipped resource via a cURL adapter that is configured to decode content, a following call to $httpResponse->getBody() fails because it looks at the still-set Content-Encoding header and tries to decode the content, which is at that point already decoded, again.

You can reproduce it like this:
```php
$httpClient = new Zend\Http\Client($urlWithGzipEncodedStuff, [
'adapter' => 'Zend\Http\Client\Adapter\Curl',
'curloptions' => [
// Instruct cURL to accept and decode any supported encoding.
CURLOPT_ENCODING => ''
]
]);
$httpResponse = $httpClient->send();

// BOOM: tries to decode what has already been decoded by cURL
$content = $httpResponse->getBody();
```