Only downgrade providers but not the notification url

main
Jordi Boggiano 12 years ago
parent 88ae6c023b
commit 573b7a0fb7

@ -331,9 +331,6 @@ class ComposerRepository extends ArrayRepository implements StreamableRepository
}
$data = $this->fetchFile($jsonUrl, 'packages.json');
if ($this->allowSslDowngrade) {
$this->url = str_replace('https://', 'http://', $this->url);
}
// TODO remove this BC notify_batch support
if (!empty($data['notify_batch'])) {
@ -358,6 +355,10 @@ class ComposerRepository extends ArrayRepository implements StreamableRepository
}
}
if ($this->allowSslDowngrade) {
$this->url = str_replace('https://', 'http://', $this->url);
}
if (!empty($data['providers-url'])) {
if ('/' === $data['providers-url'][0]) {
$this->providersUrl = preg_replace('{(https?://[^/]+).*}i', '$1' . $data['providers-url'], $this->url);

Loading…
Cancel
Save