Set timeout.
authorJan Schneider <jan@horde.org>
Mon, 8 Feb 2010 22:45:50 +0000 (23:45 +0100)
committerJan Schneider <jan@horde.org>
Mon, 8 Feb 2010 22:45:50 +0000 (23:45 +0100)
framework/Http/lib/Horde/Http/Request/Curl.php
framework/Http/lib/Horde/Http/Request/Peclhttp.php

index cf46e3d..eb150f6 100644 (file)
@@ -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)) {
index 06b0eca..feedf9f 100644 (file)
@@ -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) {