Commit 809e6e10 authored by Robert Elwell's avatar Robert Elwell

Added proxy support to Curl adapter

parent 5c7afe1c
...@@ -134,6 +134,10 @@ class Solarium_Client_Adapter_Curl extends Solarium_Client_Adapter ...@@ -134,6 +134,10 @@ class Solarium_Client_Adapter_Curl extends Solarium_Client_Adapter
curl_setopt($handler, CURLOPT_FOLLOWLOCATION, true); curl_setopt($handler, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($handler, CURLOPT_TIMEOUT, $options['timeout']); curl_setopt($handler, CURLOPT_TIMEOUT, $options['timeout']);
if ( $proxy = $this->getOption('proxy') ) {
curl_setopt($handler, CURLOPT_PROXY, $proxy);
}
if (!isset($options['headers']['Content-Type'])) { if (!isset($options['headers']['Content-Type'])) {
$options['headers']['Content-Type'] = 'text/xml; charset=utf-8'; $options['headers']['Content-Type'] = 'text/xml; charset=utf-8';
} }
......
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