Skip to content

Commit

Permalink
Merge branch 'hotfix/3204'
Browse files Browse the repository at this point in the history
  • Loading branch information
weierophinney committed Dec 13, 2012
2 parents 7cb1197 + 66c1dc7 commit aa7531e
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 5 deletions.
8 changes: 4 additions & 4 deletions library/Zend/Http/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -582,6 +582,10 @@ public function setStream($streamfile = true)
*/
public function getStream()
{
if (!is_null($this->streamName)) {
return $this->streamName;
}

return $this->config['outputstream'];
}

Expand Down Expand Up @@ -834,10 +838,6 @@ public function send(Request $request = null)
if (!is_resource($stream) && is_string($stream)) {
$stream = fopen($stream, 'r');
}
if (!is_resource($stream)) {
$stream = $this->getUri()->toString();
$stream = fopen($stream, 'r');
}
$streamMetaData = stream_get_meta_data($stream);
if ($streamMetaData['seekable']) {
rewind($stream);
Expand Down
13 changes: 12 additions & 1 deletion library/Zend/Http/Response.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

namespace Zend\Http;

use Zend\Stdlib\ErrorHandler;
use Zend\Stdlib\ResponseInterface;

/**
Expand Down Expand Up @@ -476,7 +477,17 @@ protected function decodeGzip($body)
);
}

return gzinflate(substr($body, 10));
ErrorHandler::start();
$return = gzinflate(substr($body, 10));
$test = ErrorHandler::stop();
if ($test) {
throw new Exception\RuntimeException(
'Error occurred during gzip inflation',
0,
$test
);
}
return $return;
}

/**
Expand Down

0 comments on commit aa7531e

Please sign in to comment.