diff --git a/library/Requests/Transport/cURL.php b/library/Requests/Transport/cURL.php index 36cba510c..ad79ac1fb 100755 --- a/library/Requests/Transport/cURL.php +++ b/library/Requests/Transport/cURL.php @@ -373,8 +373,9 @@ protected function setup_handle($url, $headers, $data, $options) { curl_setopt($this->handle, CURLOPT_URL, $url); curl_setopt($this->handle, CURLOPT_REFERER, $url); curl_setopt($this->handle, CURLOPT_USERAGENT, $options['useragent']); - curl_setopt($this->handle, CURLOPT_HTTPHEADER, $headers); - + if (!empty($headers)) { + curl_setopt($this->handle, CURLOPT_HTTPHEADER, $headers); + } if ($options['protocol_version'] === 1.1) { curl_setopt($this->handle, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1); }