1
0
Fork 0

Fix passing of repo http options in async requests

pull/9063/head
Jordi Boggiano 2020-07-17 17:16:19 +02:00
parent c3028c02d9
commit c3d40ae79a
No known key found for this signature in database
GPG Key ID: 7BBD42C429EC80BC
1 changed files with 7 additions and 1 deletions

View File

@ -1202,7 +1202,13 @@ class ComposerRepository extends ArrayRepository implements ConfigurableReposito
$filename = $preFileDownloadEvent->getProcessedUrl(); $filename = $preFileDownloadEvent->getProcessedUrl();
} }
$options = $lastModifiedTime ? array('http' => array('header' => array('If-Modified-Since: '.$lastModifiedTime))) : array(); $options = $this->options;
if ($lastModifiedTime) {
if (isset($options['http']['header'])) {
$options['http']['header'] = (array) $options['http']['header'];
}
$options['http']['header'][] = array('If-Modified-Since: '.$lastModifiedTime);
}
$io = $this->io; $io = $this->io;
$url = $this->url; $url = $this->url;