diff options
author | 2024-12-30 00:19:18 +0100 | |
---|---|---|
committer | 2024-12-30 00:19:18 +0100 | |
commit | 152e96d3d06b626574ecc79781479d46c7d9867d (patch) | |
tree | e436fadc94c46098086dcf95f5218188cdd2a4fd /lib | |
parent | f0db6a22d1a6945314950ccc2997966b29a81944 (diff) | |
download | rss-bridge-152e96d3d06b626574ecc79781479d46c7d9867d.tar.gz rss-bridge-152e96d3d06b626574ecc79781479d46c7d9867d.tar.zst rss-bridge-152e96d3d06b626574ecc79781479d46c7d9867d.zip |
fix: broken if_not_modified_since (#4377)
Diffstat (limited to 'lib')
-rw-r--r-- | lib/contents.php | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/lib/contents.php b/lib/contents.php index 56a3db20..752c0ff2 100644 --- a/lib/contents.php +++ b/lib/contents.php @@ -24,6 +24,13 @@ function getContents( // 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 = []; foreach ($httpHeaders as $httpHeader) { $parts = explode(':', $httpHeader); @@ -69,13 +76,7 @@ function getContents( 'TE' => 'trailers', ]; - $config = [ - 'useragent' => Configuration::getConfig('http', 'useragent'), - 'timeout' => Configuration::getConfig('http', 'timeout'), - 'retries' => Configuration::getConfig('http', 'retries'), - 'headers' => array_merge($defaultHttpHeaders, $httpHeadersNormalized), - 'curl_options' => $curlOptions, - ]; + $config['headers'] = array_merge($defaultHttpHeaders, $httpHeadersNormalized); $maxFileSize = Configuration::getConfig('http', 'max_filesize'); if ($maxFileSize) { |