forked from GNUsocial/gnu-social
default connect_timeout to 5 instead of extlib 10
This commit is contained in:
parent
cae344b67b
commit
f768de4b46
@ -353,6 +353,7 @@ $default =
|
|||||||
array('ssl_cafile' => false, // To enable SSL cert validation, point to a CA bundle (eg '/usr/lib/ssl/certs/ca-certificates.crt') (this activates "ssl_verify_peer")
|
array('ssl_cafile' => false, // To enable SSL cert validation, point to a CA bundle (eg '/usr/lib/ssl/certs/ca-certificates.crt') (this activates "ssl_verify_peer")
|
||||||
'ssl_verify_host' => true, // HTTPRequest2 makes sure this is set to CURLOPT_SSL_VERIFYHOST==2 if using curl
|
'ssl_verify_host' => true, // HTTPRequest2 makes sure this is set to CURLOPT_SSL_VERIFYHOST==2 if using curl
|
||||||
'curl' => false, // Use CURL backend for HTTP fetches if available. (If not, PHP's socket streams will be used.)
|
'curl' => false, // Use CURL backend for HTTP fetches if available. (If not, PHP's socket streams will be used.)
|
||||||
|
'connect_timeout' => 5,
|
||||||
'proxy_host' => null,
|
'proxy_host' => null,
|
||||||
'proxy_port' => null,
|
'proxy_port' => null,
|
||||||
'proxy_user' => null,
|
'proxy_user' => null,
|
||||||
|
@ -116,6 +116,7 @@ class HTTPClient extends HTTP_Request2
|
|||||||
|
|
||||||
function __construct($url=null, $method=self::METHOD_GET, $config=array())
|
function __construct($url=null, $method=self::METHOD_GET, $config=array())
|
||||||
{
|
{
|
||||||
|
$this->config['connect_timeout'] = common_config('http', 'connect_timeout') ?: $this->config['connect_timeout'];
|
||||||
$this->config['max_redirs'] = 10;
|
$this->config['max_redirs'] = 10;
|
||||||
$this->config['follow_redirects'] = true;
|
$this->config['follow_redirects'] = true;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user