Actually, use the 'headers' option to add the headers, to make it
authorMichael J. Rubinsky <mrubinsk@horde.org>
Fri, 2 Oct 2009 00:56:58 +0000 (20:56 -0400)
committerMichael J. Rubinsky <mrubinsk@horde.org>
Fri, 2 Oct 2009 00:56:58 +0000 (20:56 -0400)
clearer why they can't be set before setOptions()

framework/Http/lib/Horde/Http/Request/Peclhttp.php

index 5431e8b..06c7f65 100644 (file)
@@ -87,11 +87,12 @@ class Horde_Http_Request_Peclhttp extends Horde_Http_Request_Base
             $httpOptions['httpauthtype'] = $this->_httpAuthScheme($this->authenticationScheme);
         }
 
+        // Headers
+        $httpOptions['headers'] = $this->headers;
+
         // Set options
         $httpRequest->setOptions($httpOptions);
 
-        // Concatenate the headers
-        $httpRequest->addHeaders($this->headers);
         try {
             $httpResponse = $httpRequest->send();
         } catch (HttpException $e) {