|
|
|
@ -1014,8 +1014,9 @@ class ComposerRepository extends ArrayRepository implements ConfigurableReposito
|
|
|
|
|
while ($retries--) {
|
|
|
|
|
try {
|
|
|
|
|
if ($this->eventDispatcher) {
|
|
|
|
|
$preFileDownloadEvent = new PreFileDownloadEvent(PluginEvents::PRE_FILE_DOWNLOAD, $this->httpDownloader, $filename);
|
|
|
|
|
$preFileDownloadEvent = new PreFileDownloadEvent(PluginEvents::PRE_FILE_DOWNLOAD, $this->httpDownloader, $filename, 'metadata');
|
|
|
|
|
$this->eventDispatcher->dispatch($preFileDownloadEvent->getName(), $preFileDownloadEvent);
|
|
|
|
|
$filename = $preFileDownloadEvent->getProcessedUrl();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$response = $this->httpDownloader->get($filename, $this->options);
|
|
|
|
@ -1100,8 +1101,9 @@ class ComposerRepository extends ArrayRepository implements ConfigurableReposito
|
|
|
|
|
while ($retries--) {
|
|
|
|
|
try {
|
|
|
|
|
if ($this->eventDispatcher) {
|
|
|
|
|
$preFileDownloadEvent = new PreFileDownloadEvent(PluginEvents::PRE_FILE_DOWNLOAD, $this->httpDownloader, $filename);
|
|
|
|
|
$preFileDownloadEvent = new PreFileDownloadEvent(PluginEvents::PRE_FILE_DOWNLOAD, $this->httpDownloader, $filename, 'metadata');
|
|
|
|
|
$this->eventDispatcher->dispatch($preFileDownloadEvent->getName(), $preFileDownloadEvent);
|
|
|
|
|
$filename = $preFileDownloadEvent->getProcessedUrl();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$options = $this->options;
|
|
|
|
@ -1166,8 +1168,9 @@ class ComposerRepository extends ArrayRepository implements ConfigurableReposito
|
|
|
|
|
|
|
|
|
|
$httpDownloader = $this->httpDownloader;
|
|
|
|
|
if ($this->eventDispatcher) {
|
|
|
|
|
$preFileDownloadEvent = new PreFileDownloadEvent(PluginEvents::PRE_FILE_DOWNLOAD, $this->httpDownloader, $filename);
|
|
|
|
|
$preFileDownloadEvent = new PreFileDownloadEvent(PluginEvents::PRE_FILE_DOWNLOAD, $this->httpDownloader, $filename, 'metadata');
|
|
|
|
|
$this->eventDispatcher->dispatch($preFileDownloadEvent->getName(), $preFileDownloadEvent);
|
|
|
|
|
$filename = $preFileDownloadEvent->getProcessedUrl();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$options = $lastModifiedTime ? array('http' => array('header' => array('If-Modified-Since: '.$lastModifiedTime))) : array();
|
|
|
|
|