Commit 90d006c6 authored by Bas de Nooijer's avatar Bas de Nooijer

Merge pull request #341 from basdenooijer/master

Fix curl headers for solr > 5
parents a9c1c5fb 2157a3d2
...@@ -156,7 +156,11 @@ class Curl extends Configurable implements AdapterInterface ...@@ -156,7 +156,11 @@ class Curl extends Configurable implements AdapterInterface
} }
if (!isset($options['headers']['Content-Type'])) { if (!isset($options['headers']['Content-Type'])) {
$options['headers']['Content-Type'] = 'text/xml; charset=utf-8'; if($method == Request::METHOD_GET){
$options['headers']['Content-Type'] = 'application/x-www-form-urlencoded; charset=utf-8';
} else {
$options['headers']['Content-Type'] = 'application/xml; charset=utf-8';
}
} }
// Try endpoint authentication first, fallback to request for backwards compatibility // Try endpoint authentication first, fallback to request for backwards compatibility
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment