From: Michael J. Rubinsky Date: Fri, 2 Oct 2009 00:48:37 +0000 (-0400) Subject: Add headers after other values are set, otherwise they get overwritten. X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=7381c954b6f7b9eed6a93eaad4f56c64cc255169;p=horde.git Add headers after other values are set, otherwise they get overwritten. --- diff --git a/framework/Http/lib/Horde/Http/Request/Peclhttp.php b/framework/Http/lib/Horde/Http/Request/Peclhttp.php index fbf053c9d..5431e8b6e 100644 --- a/framework/Http/lib/Horde/Http/Request/Peclhttp.php +++ b/framework/Http/lib/Horde/Http/Request/Peclhttp.php @@ -62,7 +62,6 @@ class Horde_Http_Request_Peclhttp extends Horde_Http_Request_Base public function send() { $httpRequest = new HttpRequest($this->uri, $this->_httpMethods[$this->method]); - $httpRequest->setHeaders($this->headers); $data = $this->data; if (is_array($data)) { @@ -91,6 +90,8 @@ class Horde_Http_Request_Peclhttp extends Horde_Http_Request_Base // Set options $httpRequest->setOptions($httpOptions); + // Concatenate the headers + $httpRequest->addHeaders($this->headers); try { $httpResponse = $httpRequest->send(); } catch (HttpException $e) {