1
0
mirror of https://github.com/RSS-Bridge/rss-bridge.git synced 2025-07-31 13:50:23 +02:00

feat: add a timeout option for http client (#2600)

This commit is contained in:
dag
2022-04-08 21:22:13 +02:00
committed by GitHub
parent 8c18c02c65
commit cce11964a4
3 changed files with 20 additions and 0 deletions

View File

@@ -169,6 +169,7 @@ function getContents($url, $header = array(), $opts = array(), $returnHeader = f
}
curl_setopt($ch, CURLOPT_USERAGENT, Configuration::getConfig('http', 'useragent'));
curl_setopt($ch, CURLOPT_TIMEOUT, Configuration::getConfig('http', 'timeout'));
curl_setopt($ch, CURLOPT_ENCODING, '');
curl_setopt($ch, CURLOPT_PROTOCOLS, CURLPROTO_HTTP | CURLPROTO_HTTPS);