From 55727fd4ed8dc737d741c6b214252d167c16e970 Mon Sep 17 00:00:00 2001 From: "Michael J. Rubinsky" Date: Sun, 27 Sep 2009 13:11:30 -0400 Subject: [PATCH] Add the headers array to the Curl request --- framework/Http/lib/Horde/Http/Request/Curl.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/framework/Http/lib/Horde/Http/Request/Curl.php b/framework/Http/lib/Horde/Http/Request/Curl.php index 56ddefa49..86a4642f0 100644 --- a/framework/Http/lib/Horde/Http/Request/Curl.php +++ b/framework/Http/lib/Horde/Http/Request/Curl.php @@ -47,6 +47,13 @@ class Horde_Http_Request_Curl extends Horde_Http_Request_Base } if ($data) { curl_setopt($curl, CURLOPT_POSTFIELDS, $data); } + // Concatenate the headers + $hdr = array(); + foreach ($this->headers as $header => $value) { + $hdr[] = $header . ': ' . $value; + } + curl_setopt($curl, CURLOPT_HTTPHEADER, $hdr); + $result = curl_exec($curl); if ($result === false) { throw new Horde_Http_Exception(curl_error($curl), curl_errno($curl)); -- 2.11.0