From a808bc1305268c62c7f16d832c4fb5d2369b918a Mon Sep 17 00:00:00 2001 From: Jan Schneider Date: Mon, 8 Feb 2010 23:45:50 +0100 Subject: [PATCH] Set timeout. --- framework/Http/lib/Horde/Http/Request/Curl.php | 1 + framework/Http/lib/Horde/Http/Request/Peclhttp.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/framework/Http/lib/Horde/Http/Request/Curl.php b/framework/Http/lib/Horde/Http/Request/Curl.php index cf46e3d64..eb150f6bd 100644 --- a/framework/Http/lib/Horde/Http/Request/Curl.php +++ b/framework/Http/lib/Horde/Http/Request/Curl.php @@ -57,6 +57,7 @@ class Horde_Http_Request_Curl extends Horde_Http_Request_Base curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); curl_setopt($curl, CURLOPT_HEADER, true); curl_setopt($curl, CURLOPT_CUSTOMREQUEST, $this->method); + curl_setopt($curl, CURLOPT_TIMEOUT, $this->timeout); $data = $this->data; if (is_array($data)) { diff --git a/framework/Http/lib/Horde/Http/Request/Peclhttp.php b/framework/Http/lib/Horde/Http/Request/Peclhttp.php index 06b0eca87..feedf9f71 100644 --- a/framework/Http/lib/Horde/Http/Request/Peclhttp.php +++ b/framework/Http/lib/Horde/Http/Request/Peclhttp.php @@ -71,7 +71,7 @@ class Horde_Http_Request_Peclhttp extends Horde_Http_Request_Base $httpRequest->setRawPostData($data); } - $httpOptions = array(); + $httpOptions = array('timeout' => $this->timeout); // Proxy settings if ($this->proxyServer) { -- 2.11.0