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

Issue Type: Bug Created: 2010-08-11T17:05:26.000+0000 Last Updated: 2012-11-20T21:38:14.000+0000 Status: Open Fix version(s): Reporter: Grayson Koonce (merrix) Assignee: None Tags: - Zend_Http_Client

Related issues: Attachments:


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.


No comments to display

Have you found an issue?

See the Overview section for more details.


© 2006-2018 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.