From a6e3b23ca5a2d290ea1c069ec50062e61dbdc9f5 Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Fri, 28 Jun 2013 19:05:18 +0200 Subject: [PATCH] Stop trying to bypass https since github does not and will not support non-https transports --- src/Composer/Downloader/ArchiveDownloader.php | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/src/Composer/Downloader/ArchiveDownloader.php b/src/Composer/Downloader/ArchiveDownloader.php index f9a12ee5b..5248227e6 100644 --- a/src/Composer/Downloader/ArchiveDownloader.php +++ b/src/Composer/Downloader/ArchiveDownloader.php @@ -99,16 +99,7 @@ abstract class ArchiveDownloader extends FileDownloader } if (!extension_loaded('openssl') && (0 === strpos($url, 'https:') || 0 === strpos($url, 'http://github.com'))) { - // bypass https for github if openssl is disabled - if (preg_match('{^https://api\.github\.com/repos/([^/]+/[^/]+)/(zip|tar)ball/([^/]+)$}i', $url, $match)) { - $url = 'http://nodeload.github.com/'.$match[1].'/'.$match[2].'/'.$match[3]; - } elseif (preg_match('{^https://github\.com/([^/]+/[^/]+)/(zip|tar)ball/([^/]+)$}i', $url, $match)) { - $url = 'http://nodeload.github.com/'.$match[1].'/'.$match[2].'/'.$match[3]; - } elseif (preg_match('{^https://github\.com/([^/]+/[^/]+)/archive/([^/]+)\.(zip|tar\.gz)$}i', $url, $match)) { - $url = 'http://nodeload.github.com/'.$match[1].'/'.$match[3].'/'.$match[2]; - } else { - throw new \RuntimeException('You must enable the openssl extension to download files via https'); - } + throw new \RuntimeException('You must enable the openssl extension to download files via https'); } return parent::processUrl($package, $url);