瀏覽代碼

[Http] Add body support for OPTIONS request for curl

Eric GELOEN 11 年之前
父節點
當前提交
90df8737e4
共有 1 個文件被更改,包括 3 次插入0 次删除
  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