瀏覽代碼

Re-doing fix for ZF-9685

- removed close() method
- fixed broken code to call $this->adapter->close() instead
- all other changes and unit tests from CS-21919 by dragonbe are kept


git-svn-id: http://framework.zend.com/svn/framework/standard/trunk@21951 44c647ce-9c0f-0410-b52a-842ac1e357ba
shahar 16 年之前
父節點
當前提交
4082364387
共有 1 個文件被更改,包括 4 次插入13 次删除
  1. 4 13
      library/Zend/Http/Client.php

+ 4 - 13
library/Zend/Http/Client.php

@@ -911,26 +911,17 @@ class Zend_Http_Client
         }
 
         if (false === ($fp = @fopen($this->_stream_name, "w+b"))) {
-                $this->close();
+                if ($this->adapter instanceof Zend_Http_Client_Adapter_Interface) {
+                    $this->adapter->close();
+                }
                 require_once 'Zend/Http/Client/Exception.php';
                 throw new Zend_Http_Client_Exception("Could not open temp file {$this->_stream_name}");
-
         }
+        
         return $fp;
     }
     
     /**
-     * Closes the connection with the server
-     * 
-     * @return void
-     * @group ZF-9685
-     */
-    public function close()
-    {
-    	$this->getAdapter()->close();
-    }
-
-    /**
      * Send the HTTP request and return an HTTP response object
      *
      * @param string $method