mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2025-12-14 01:35:54 +00:00
fetch_file_contents: set timeout when not using CURL
This commit is contained in:
@@ -462,10 +462,13 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO: should this support POST requests or not? idk
|
||||||
|
|
||||||
if (!$post_query && $timestamp) {
|
if (!$post_query && $timestamp) {
|
||||||
$context = stream_context_create(array(
|
$context = stream_context_create(array(
|
||||||
'http' => array(
|
'http' => array(
|
||||||
'method' => 'GET',
|
'method' => 'GET',
|
||||||
|
'timeout' => $timeout ? $timeout : FILE_FETCH_TIMEOUT,
|
||||||
'protocol_version'=> 1.1,
|
'protocol_version'=> 1.1,
|
||||||
'header' => "If-Modified-Since: ".gmdate("D, d M Y H:i:s \\G\\M\\T\r\n", $timestamp)
|
'header' => "If-Modified-Since: ".gmdate("D, d M Y H:i:s \\G\\M\\T\r\n", $timestamp)
|
||||||
)));
|
)));
|
||||||
@@ -473,6 +476,7 @@
|
|||||||
$context = stream_context_create(array(
|
$context = stream_context_create(array(
|
||||||
'http' => array(
|
'http' => array(
|
||||||
'method' => 'GET',
|
'method' => 'GET',
|
||||||
|
'timeout' => $timeout ? $timeout : FILE_FETCH_TIMEOUT,
|
||||||
'protocol_version'=> 1.1
|
'protocol_version'=> 1.1
|
||||||
)));
|
)));
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user