Commit 3f6808b1 authored by Bas de Nooijer's avatar Bas de Nooijer

Merge pull request #336 from mfpierre/fix-curl

Fix curl headers for solr > 5
parents 29709115 7bc6bc24
...@@ -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