Skip to content

switch to https by default #154

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions PEAR/Command/Channels.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down
34 changes: 17 additions & 17 deletions PEAR/Registry.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand All @@ -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');
Expand All @@ -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');
Expand Down Expand Up @@ -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;
}

Expand All @@ -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;
}
Expand All @@ -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;
}

Expand Down
Loading