Explorar o código

[Http] Add body support for OPTIONS request for curl

Eric GELOEN %!s(int64=11) %!d(string=hai) anos
pai
achega
90df8737e4
Modificáronse 1 ficheiros con 3 adicións e 0 borrados
  1. 3 0
      library/Zend/Http/Client/Adapter/Curl.php

+ 3 - 0
library/Zend/Http/Client/Adapter/Curl.php

@@ -396,6 +396,9 @@ class Zend_Http_Client_Adapter_Curl implements Zend_Http_Client_Adapter_Interfac
         } elseif ($method == Zend_Http_Client::DELETE) {
             // This is a DELETE by a setRawData string
             curl_setopt($this->_curl, CURLOPT_POSTFIELDS, $body);
+        } elseif ($method == Zend_Http_Client::OPTIONS) {
+            // This is an OPTIONS by a setRawData string
+            curl_setopt($this->_curl, CURLOPT_POSTFIELDS, $body);
         }
 
         // set additional curl options