ZF-11897: Zend_Http_Client_Adapter_Curl::setCurlOption only take effect for a predefined list of options


I suggest the following line of code, just before the curl_exec, in order to allow curl specific options in the adapter.

410> // send the request 411> curl_setopt_array($this->_curl, $this->_config['curloptions']); 412> $response = curl_exec($this->_curl);


1.9.8 is quite old. Have you tried using v1.11.11?

However, I do see your point: If you look the list of allowed CURL options in {{Zend_Http_Client_Adapter_Curl::__construct}} and compare that with the list from the" rel="nofollow">PHP manual page for {{curl_setopt}} there is quite a difference.

Apologies...I misread the source of {{Zend_Http_Client_Adapter_Curl}}. The adapter already passes on all CURL options set via configuration key 'curloptions' or via the setter {{setCurlOption}} just before the call to {{curl_exec}}:

// set additional curl options
if (isset($this->_config['curloptions'])) {
    foreach ((array)$this->_config['curloptions'] as $k => $v) {
        if (!in_array($k, $this->_invalidOverwritableCurlOptions)) {
            if (curl_setopt($this->_curl, $k, $v) == false) {
                require_once 'Zend/Http/Client/Exception.php';
                throw new Zend_Http_Client_Exception(sprintf("Unknown or erroreous cURL option '%s' set", $k));


cURL options specified in {{$this->_invalidOverwritableCurlOptions}} cannot be overridden, and are ignored in the code snipped above when encountered.