1
0
Fork 0

Merge remote-tracking branch 'rkallensee/pear-https'

pull/1361/merge
Jordi Boggiano 2012-11-24 16:25:13 +01:00
commit f2d6400285
1 changed files with 3 additions and 1 deletions

View File

@ -106,7 +106,9 @@ class PearRepository extends ArrayRepository
// distribution url must be read from /r/{packageName}/{version}.xml::/r/g:text() // distribution url must be read from /r/{packageName}/{version}.xml::/r/g:text()
// but this location is 'de-facto' standard // but this location is 'de-facto' standard
$distUrl = "http://{$packageDefinition->getChannelName()}/get/{$packageDefinition->getPackageName()}-{$version}.tgz"; $urlBits = parse_url($this->url);
$scheme = (isset($urlBits['scheme']) && 'https' === $urlBits['scheme'] && extension_loaded('openssl')) ? 'https' : 'http';
$distUrl = "{$scheme}://{$packageDefinition->getChannelName()}/get/{$packageDefinition->getPackageName()}-{$version}.tgz";
$requires = array(); $requires = array();
$suggests = array(); $suggests = array();