Sfoglia il codice sorgente

[Http] Add body support for OPTIONS request for curl

Eric GELOEN 11 anni fa
parent
commit
90df8737e4
1 ha cambiato i file con 3 aggiunte e 0 eliminazioni
  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