ZF-10297: Unable to set content type to curl adapter.

Description

Setting the Content-Type via setHeader(), setRawData(), setEncType() does not get passed to the curl adapter. It seems like you have to set 'curloptions' => array(CURLOPT_HTTPHEADER => array('Content-Type: text/plain')) but CURLOPT_HTTPHEADER is an invalid curl option according to Zend_Http_Client_Adapter_Curl::_invalidOverwritableCurlOptions.

I came across this bug when trying to analyze a return response that was code 500. For some reason, the default adapter doesnt return the response. I used curl in isolation and saw that it DID return the response. When I use the adapter however, no response. If I pass the option directly to curl_exec on line 411 of Curl.php it works fine.

Comments

No comments to display