Skip to content

Commit

Permalink
Removing supressing errors from HttpSocket, using condition instead. F…
Browse files Browse the repository at this point in the history
…ixes #6483.

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@8232 3807eeeb-6ff5-0310-8944-8be069107fe0
  • Loading branch information
renan committed Jul 15, 2009
1 parent baea319 commit 3b872a2
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions cake/libs/http_socket.php
Expand Up @@ -220,7 +220,10 @@ function request($request = array()) {
$this->request['header']['Content-Length'] = strlen($this->request['body']);
}

$connectionType = @$this->request['header']['Connection'];
$connectionType = null;
if (isset($this->request['header']['Connection'])) {
$connectionType = $this->request['header']['Connection'];
}
$this->request['header'] = $this->buildHeader($this->request['header']).$cookies;

if (empty($this->request['line'])) {
Expand Down Expand Up @@ -395,7 +398,11 @@ function parseResponse($message) {
}

$response['header'] = $this->parseHeader($response['raw']['header']);
$decoded = $this->decodeBody($response['raw']['body'], @$response['header']['Transfer-Encoding']);
$transferEncoding = null;
if (isset($response['header']['Transfer-Encoding'])) {
$transferEncoding = $response['header']['Transfer-Encoding'];
}
$decoded = $this->decodeBody($response['raw']['body'], $transferEncoding);
$response['body'] = $decoded['body'];

if (!empty($decoded['header'])) {
Expand Down

0 comments on commit 3b872a2

Please sign in to comment.