cowboy/php-simple-proxy — Issue #13: Content-Type header
Author: germank
Created: 2011-11-23 15:08:21+00:00
State: open

The Content-Type header isn't propagated when POSTing data. Instead, it's replaced by a form-data type. This is particular issue is problematic when dealing with RESTful services that consumes a particular content-type (application/json, application/xml).
I solved this by adding this line just before the curl_exec:

curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: '.$_SERVER['CONTENT_TYPE']));