Commit 7bc6bc24 authored by Pierre's avatar Pierre

Fix curl headers for solr > 5

parent 45ed4658
......@@ -156,7 +156,11 @@ class Curl extends Configurable implements AdapterInterface
}
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
......
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