diff -r 5a6b6e770365 -r 68c69c656a2c web/lib/Zend/Http/Client.php --- a/web/lib/Zend/Http/Client.php Thu May 07 15:10:09 2015 +0200 +++ b/web/lib/Zend/Http/Client.php Thu May 07 15:16:02 2015 +0200 @@ -16,8 +16,8 @@ * @category Zend * @package Zend_Http * @subpackage Client - * @version $Id: Client.php 24593 2012-01-05 20:35:02Z matthew $ - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @version $Id$ + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -60,7 +60,7 @@ * @package Zend_Http * @subpackage Client * @throws Zend_Http_Client_Exception - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Http_Client @@ -77,6 +77,7 @@ const OPTIONS = 'OPTIONS'; const CONNECT = 'CONNECT'; const MERGE = 'MERGE'; + const PATCH = 'PATCH'; /** * Supported HTTP Authentication methods @@ -268,7 +269,7 @@ * * @var resource */ - static protected $_fileInfoDb = null; + protected static $_fileInfoDb = null; /** * Constructor method. Will create a new HTTP client. Accepts the target @@ -385,12 +386,17 @@ public function setMethod($method = self::GET) { if (! preg_match('/^[^\x00-\x1f\x7f-\xff\(\)<>@,;:\\\\"\/\[\]\?={}\s]+$/', $method)) { - /** @see Zend_Http_Client_Exception */ require_once 'Zend/Http/Client/Exception.php'; throw new Zend_Http_Client_Exception("'{$method}' is not a valid HTTP request method."); } - if (($method == self::POST || $method == self::PUT || $method == self::DELETE) && $this->enctype === null) { + if (($method == self::POST + || $method == self::PUT + || $method == self::DELETE + || $method == self::PATCH + || $method == self::OPTIONS) + && $this->enctype === null + ) { $this->setEncType(self::ENC_URLENCODED); } @@ -759,7 +765,7 @@ 'ctype' => $ctype, 'data' => $data ); - + $this->body_field_order[$formname] = self::VTYPE_FILE; return $this; @@ -1454,7 +1460,8 @@ * @param array $headers Associative array of optional headers @example ("Content-Transfer-Encoding" => "binary") * @return string */ - public static function encodeFormData($boundary, $name, $value, $filename = null, $headers = array()) { + public static function encodeFormData($boundary, $name, $value, $filename = null, $headers = array()) + { $ret = "--{$boundary}\r\n" . 'Content-Disposition: form-data; name="' . $name .'"'; @@ -1529,7 +1536,7 @@ * @param string $prefix * @return array */ - static protected function _flattenParametersArray($parray, $prefix = null) + protected static function _flattenParametersArray($parray, $prefix = null) { if (! is_array($parray)) { return $parray;