From 573b7a0fb750a73af57327c94d65373933c17290 Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Wed, 27 Feb 2013 13:32:21 +0100 Subject: [PATCH] Only downgrade providers but not the notification url --- src/Composer/Repository/ComposerRepository.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Composer/Repository/ComposerRepository.php b/src/Composer/Repository/ComposerRepository.php index 86af9461c..323848061 100644 --- a/src/Composer/Repository/ComposerRepository.php +++ b/src/Composer/Repository/ComposerRepository.php @@ -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);