mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-01-09 21:17:27 +03:00
fix: broken if_not_modified_since (#4377)
This commit is contained in:
parent
f0db6a22d1
commit
152e96d3d0
1 changed files with 8 additions and 7 deletions
|
@ -24,6 +24,13 @@ function getContents(
|
||||||
|
|
||||||
// TODO: consider url validation at this point
|
// TODO: consider url validation at this point
|
||||||
|
|
||||||
|
$config = [
|
||||||
|
'useragent' => Configuration::getConfig('http', 'useragent'),
|
||||||
|
'timeout' => Configuration::getConfig('http', 'timeout'),
|
||||||
|
'retries' => Configuration::getConfig('http', 'retries'),
|
||||||
|
'curl_options' => $curlOptions,
|
||||||
|
];
|
||||||
|
|
||||||
$httpHeadersNormalized = [];
|
$httpHeadersNormalized = [];
|
||||||
foreach ($httpHeaders as $httpHeader) {
|
foreach ($httpHeaders as $httpHeader) {
|
||||||
$parts = explode(':', $httpHeader);
|
$parts = explode(':', $httpHeader);
|
||||||
|
@ -69,13 +76,7 @@ function getContents(
|
||||||
'TE' => 'trailers',
|
'TE' => 'trailers',
|
||||||
];
|
];
|
||||||
|
|
||||||
$config = [
|
$config['headers'] = array_merge($defaultHttpHeaders, $httpHeadersNormalized);
|
||||||
'useragent' => Configuration::getConfig('http', 'useragent'),
|
|
||||||
'timeout' => Configuration::getConfig('http', 'timeout'),
|
|
||||||
'retries' => Configuration::getConfig('http', 'retries'),
|
|
||||||
'headers' => array_merge($defaultHttpHeaders, $httpHeadersNormalized),
|
|
||||||
'curl_options' => $curlOptions,
|
|
||||||
];
|
|
||||||
|
|
||||||
$maxFileSize = Configuration::getConfig('http', 'max_filesize');
|
$maxFileSize = Configuration::getConfig('http', 'max_filesize');
|
||||||
if ($maxFileSize) {
|
if ($maxFileSize) {
|
||||||
|
|
Loading…
Reference in a new issue