Преглед изворни кода

Merge r25272 to 1.12 release branch

git-svn-id: http://framework.zend.com/svn/framework/standard/branches/release-1.12@25273 44c647ce-9c0f-0410-b52a-842ac1e357ba
frosch пре 13 година
родитељ
комит
8f9f1b36be
1 измењених фајлова са 9 додато и 5 уклоњено
  1. 9 5
      library/Zend/Http/Client/Adapter/Proxy.php

+ 9 - 5
library/Zend/Http/Client/Adapter/Proxy.php

@@ -66,7 +66,7 @@ class Zend_Http_Client_Adapter_Proxy extends Zend_Http_Client_Adapter_Socket
         'proxy_user'    => '',
         'proxy_pass'    => '',
         'proxy_auth'    => Zend_Http_Client::AUTH_BASIC,
-        'persistent'    => false
+        'persistent'    => false,
     );
 
     /**
@@ -96,7 +96,7 @@ class Zend_Http_Client_Adapter_Proxy extends Zend_Http_Client_Adapter_Socket
     public function connect($host, $port = 80, $secure = false)
     {
         // If no proxy is set, fall back to Socket adapter
-        if (! $this->config['proxy_host']) {
+        if (!$this->config['proxy_host']) {
             return parent::connect($host, $port, $secure);
         }
 
@@ -124,7 +124,9 @@ class Zend_Http_Client_Adapter_Proxy extends Zend_Http_Client_Adapter_Socket
      * @return string Request as string
      * @throws Zend_Http_Client_Adapter_Exception
      */
-    public function write($method, $uri, $http_ver = '1.1', $headers = array(), $body = '')
+    public function write(
+        $method, $uri, $http_ver = '1.1', $headers = array(), $body = ''
+    )
     {
         // If no proxy is set, fall back to default Socket adapter
         if (!$this->config['proxy_host']) {
@@ -142,7 +144,9 @@ class Zend_Http_Client_Adapter_Proxy extends Zend_Http_Client_Adapter_Socket
         $host = $this->config['proxy_host'];
         $port = $this->config['proxy_port'];
 
-        if ($this->connected_to[0] != "tcp://$host" || $this->connected_to[1] != $port) {
+        if ($this->connected_to[0] != "tcp://$host"
+            || $this->connected_to[1] != $port
+        ) {
             require_once 'Zend/Http/Client/Adapter/Exception.php';
             throw new Zend_Http_Client_Adapter_Exception(
                 'Trying to write but we are connected to the wrong proxy server'
@@ -307,7 +311,7 @@ class Zend_Http_Client_Adapter_Proxy extends Zend_Http_Client_Adapter_Socket
             }
         }
 
-        if (false !== $success) {
+        if (!$success) {
             require_once 'Zend/Http/Client/Adapter/Exception.php';
             throw new Zend_Http_Client_Adapter_Exception(
                 'Unable to connect to HTTPS server through proxy: could not '