Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Removing supressing errors from HttpSocket, using condition instead. …

…Fixes #6483.

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@8232 3807eeeb-6ff5-0310-8944-8be069107fe0
  • Loading branch information...
commit 3b872a218ed89c0e2c7291ff6bc1d253f2b7d987 1 parent baea319
Renan Gonçalves renan authored
Showing with 9 additions and 2 deletions.
  1. +9 −2 cake/libs/http_socket.php
11 cake/libs/http_socket.php
View
@@ -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'])) {
@@ -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'])) {
Please sign in to comment.
Something went wrong with that request. Please try again.