From: Chuck Hagenbuch Date: Wed, 21 Jan 2009 18:47:16 +0000 (-0500) Subject: allow configuring the timeout for http_client, and default to 5 seconds instead of... X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=a18b8065d956cdd3cb245732e41304305d2fa302;p=horde.git allow configuring the timeout for http_client, and default to 5 seconds instead of the php default of 60 --- diff --git a/framework/Http_Client/lib/Horde/Http/Client.php b/framework/Http_Client/lib/Horde/Http/Client.php index 3470be3b0..64ca8fffe 100644 --- a/framework/Http_Client/lib/Horde/Http/Client.php +++ b/framework/Http_Client/lib/Horde/Http/Client.php @@ -49,6 +49,12 @@ class Horde_Http_Client protected $_proxyPass = null; /** + * HTTP timeout + * @var fload + */ + protected $_timeout = 5; + + /** * The most recent HTTP request * * An array with these values: @@ -207,7 +213,9 @@ class Horde_Http_Client $opts = array('http' => array( 'method' => $method, 'header' => implode("\n", $headers), - 'content' => $data)); + 'content' => $data, + 'timeout' => $this->_timeout, + )); // Proxy settings if ($this->proxyServer) {