Procházet zdrojové kódy

PATCH method added

zavg před 12 roky
rodič
revize
06f88bdcb7
1 změnil soubory, kde provedl 3 přidání a 1 odebrání
  1. 3 1
      library/Zend/Http/Client.php

+ 3 - 1
library/Zend/Http/Client.php

@@ -77,6 +77,7 @@ class Zend_Http_Client
     const OPTIONS = 'OPTIONS';
     const OPTIONS = 'OPTIONS';
     const CONNECT = 'CONNECT';
     const CONNECT = 'CONNECT';
     const MERGE   = 'MERGE';
     const MERGE   = 'MERGE';
+    const PATCH   = 'PATCH';
 
 
     /**
     /**
      * Supported HTTP Authentication methods
      * Supported HTTP Authentication methods
@@ -390,7 +391,8 @@ class Zend_Http_Client
             throw new Zend_Http_Client_Exception("'{$method}' is not a valid HTTP request method.");
             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)
+             && $this->enctype === null) {
             $this->setEncType(self::ENC_URLENCODED);
             $this->setEncType(self::ENC_URLENCODED);
         }
         }