fix: broken if_not_modified_since (#4377)

This commit is contained in:
Dag 2024-12-30 00:19:18 +01:00 committed by GitHub
parent f0db6a22d1
commit 152e96d3d0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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) {