From 0ec70f683def034d1fff4c3670b83106ed91eeed Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Wed, 19 Mar 2025 09:12:13 +0100 Subject: [PATCH] switch to https b y default --- PEAR/Command/Channels.php | 8 ++++---- PEAR/Registry.php | 34 +++++++++++++++++----------------- 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/PEAR/Command/Channels.php b/PEAR/Command/Channels.php index 1253eab5d..ac2d12c35 100644 --- a/PEAR/Command/Channels.php +++ b/PEAR/Command/Channels.php @@ -542,15 +542,15 @@ function doUpdate($command, $options, $params) // if force is specified, use a timestamp of "1" to force retrieval $lastmodified = isset($options['force']) ? false : $c->lastModified(); PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN); - $contents = $dl->downloadHttp('http://' . $c->getName() . '/channel.xml', + $contents = $dl->downloadHttp('https://' . $c->getName() . '/channel.xml', $this->ui, $tmpdir, null, $lastmodified); PEAR::staticPopErrorHandling(); if (PEAR::isError($contents)) { // Attempt to fall back to https - $this->ui->outputData("Channel \"$params[0]\" is not responding over http://, failed with message: " . $contents->getMessage()); - $this->ui->outputData("Trying channel \"$params[0]\" over https:// instead"); + $this->ui->outputData("Channel \"$params[0]\" is not responding over https://, failed with message: " . $contents->getMessage()); + $this->ui->outputData("Trying channel \"$params[0]\" over http:// instead"); PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN); - $contents = $dl->downloadHttp('https://' . $c->getName() . '/channel.xml', + $contents = $dl->downloadHttp('http://' . $c->getName() . '/channel.xml', $this->ui, $tmpdir, null, $lastmodified); PEAR::staticPopErrorHandling(); if (PEAR::isError($contents)) { diff --git a/PEAR/Registry.php b/PEAR/Registry.php index 144e4a18a..de5cce62a 100644 --- a/PEAR/Registry.php +++ b/PEAR/Registry.php @@ -210,10 +210,10 @@ function _initializeChannelDirs() $pear_channel->setServer('pear.php.net'); $pear_channel->setSummary('PHP Extension and Application Repository'); $pear_channel->setDefaultPEARProtocols(); - $pear_channel->setBaseURL('REST1.0', 'http://pear.php.net/rest/'); - $pear_channel->setBaseURL('REST1.1', 'http://pear.php.net/rest/'); - $pear_channel->setBaseURL('REST1.3', 'http://pear.php.net/rest/'); - //$pear_channel->setBaseURL('REST1.4', 'http://pear.php.net/rest/'); + $pear_channel->setBaseURL('REST1.0', 'https://pear.php.net/rest/'); + $pear_channel->setBaseURL('REST1.1', 'https://pear.php.net/rest/'); + $pear_channel->setBaseURL('REST1.3', 'https://pear.php.net/rest/'); + //$pear_channel->setBaseURL('REST1.4', 'https://pear.php.net/rest/'); } else { $pear_channel->setServer('pear.php.net'); $pear_channel->setAlias('pear'); @@ -235,8 +235,8 @@ function _initializeChannelDirs() $pecl_channel->setServer('pecl.php.net'); $pecl_channel->setSummary('PHP Extension Community Library'); $pecl_channel->setDefaultPEARProtocols(); - $pecl_channel->setBaseURL('REST1.0', 'http://pecl.php.net/rest/'); - $pecl_channel->setBaseURL('REST1.1', 'http://pecl.php.net/rest/'); + $pecl_channel->setBaseURL('REST1.0', 'https://pecl.php.net/rest/'); + $pecl_channel->setBaseURL('REST1.1', 'https://pecl.php.net/rest/'); $pecl_channel->setValidationPackage('PEAR_Validator_PECL', '1.0'); } else { $pecl_channel->setServer('pecl.php.net'); @@ -259,9 +259,9 @@ function _initializeChannelDirs() $doc_channel->setServer('doc.php.net'); $doc_channel->setSummary('PHP Documentation Team'); $doc_channel->setDefaultPEARProtocols(); - $doc_channel->setBaseURL('REST1.0', 'http://doc.php.net/rest/'); - $doc_channel->setBaseURL('REST1.1', 'http://doc.php.net/rest/'); - $doc_channel->setBaseURL('REST1.3', 'http://doc.php.net/rest/'); + $doc_channel->setBaseURL('REST1.0', 'https://doc.php.net/rest/'); + $doc_channel->setBaseURL('REST1.1', 'https://doc.php.net/rest/'); + $doc_channel->setBaseURL('REST1.3', 'https://doc.php.net/rest/'); } else { $doc_channel->setServer('doc.php.net'); $doc_channel->setAlias('doc'); @@ -1503,9 +1503,9 @@ function &_getChannel($channel, $noaliases = false) $pear_channel->setAlias('pear'); $pear_channel->setSummary('PHP Extension and Application Repository'); $pear_channel->setDefaultPEARProtocols(); - $pear_channel->setBaseURL('REST1.0', 'http://pear.php.net/rest/'); - $pear_channel->setBaseURL('REST1.1', 'http://pear.php.net/rest/'); - $pear_channel->setBaseURL('REST1.3', 'http://pear.php.net/rest/'); + $pear_channel->setBaseURL('REST1.0', 'https://pear.php.net/rest/'); + $pear_channel->setBaseURL('REST1.1', 'https://pear.php.net/rest/'); + $pear_channel->setBaseURL('REST1.3', 'https://pear.php.net/rest/'); return $pear_channel; } @@ -1519,8 +1519,8 @@ function &_getChannel($channel, $noaliases = false) $pear_channel->setAlias('pecl'); $pear_channel->setSummary('PHP Extension Community Library'); $pear_channel->setDefaultPEARProtocols(); - $pear_channel->setBaseURL('REST1.0', 'http://pecl.php.net/rest/'); - $pear_channel->setBaseURL('REST1.1', 'http://pecl.php.net/rest/'); + $pear_channel->setBaseURL('REST1.0', 'https://pecl.php.net/rest/'); + $pear_channel->setBaseURL('REST1.1', 'https://pecl.php.net/rest/'); $pear_channel->setValidationPackage('PEAR_Validator_PECL', '1.0'); return $pear_channel; } @@ -1536,9 +1536,9 @@ function &_getChannel($channel, $noaliases = false) $doc_channel->setAlias('phpdocs'); $doc_channel->setSummary('PHP Documentation Team'); $doc_channel->setDefaultPEARProtocols(); - $doc_channel->setBaseURL('REST1.0', 'http://doc.php.net/rest/'); - $doc_channel->setBaseURL('REST1.1', 'http://doc.php.net/rest/'); - $doc_channel->setBaseURL('REST1.3', 'http://doc.php.net/rest/'); + $doc_channel->setBaseURL('REST1.0', 'https://doc.php.net/rest/'); + $doc_channel->setBaseURL('REST1.1', 'https://doc.php.net/rest/'); + $doc_channel->setBaseURL('REST1.3', 'https://doc.php.net/rest/'); return $doc_channel; }