Skip to content

Commit b87af5d

Browse files
authored
Merge pull request #154 from remicollet/issue-htps
switch to https by default
2 parents b21ab99 + 0ec70f6 commit b87af5d

File tree

2 files changed

+21
-21
lines changed

2 files changed

+21
-21
lines changed

PEAR/Command/Channels.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -542,15 +542,15 @@ function doUpdate($command, $options, $params)
542542
// if force is specified, use a timestamp of "1" to force retrieval
543543
$lastmodified = isset($options['force']) ? false : $c->lastModified();
544544
PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN);
545-
$contents = $dl->downloadHttp('http://' . $c->getName() . '/channel.xml',
545+
$contents = $dl->downloadHttp('https://' . $c->getName() . '/channel.xml',
546546
$this->ui, $tmpdir, null, $lastmodified);
547547
PEAR::staticPopErrorHandling();
548548
if (PEAR::isError($contents)) {
549549
// Attempt to fall back to https
550-
$this->ui->outputData("Channel \"$params[0]\" is not responding over http://, failed with message: " . $contents->getMessage());
551-
$this->ui->outputData("Trying channel \"$params[0]\" over https:// instead");
550+
$this->ui->outputData("Channel \"$params[0]\" is not responding over https://, failed with message: " . $contents->getMessage());
551+
$this->ui->outputData("Trying channel \"$params[0]\" over http:// instead");
552552
PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN);
553-
$contents = $dl->downloadHttp('https://' . $c->getName() . '/channel.xml',
553+
$contents = $dl->downloadHttp('http://' . $c->getName() . '/channel.xml',
554554
$this->ui, $tmpdir, null, $lastmodified);
555555
PEAR::staticPopErrorHandling();
556556
if (PEAR::isError($contents)) {

PEAR/Registry.php

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -210,10 +210,10 @@ function _initializeChannelDirs()
210210
$pear_channel->setServer('pear.php.net');
211211
$pear_channel->setSummary('PHP Extension and Application Repository');
212212
$pear_channel->setDefaultPEARProtocols();
213-
$pear_channel->setBaseURL('REST1.0', 'http://pear.php.net/rest/');
214-
$pear_channel->setBaseURL('REST1.1', 'http://pear.php.net/rest/');
215-
$pear_channel->setBaseURL('REST1.3', 'http://pear.php.net/rest/');
216-
//$pear_channel->setBaseURL('REST1.4', 'http://pear.php.net/rest/');
213+
$pear_channel->setBaseURL('REST1.0', 'https://pear.php.net/rest/');
214+
$pear_channel->setBaseURL('REST1.1', 'https://pear.php.net/rest/');
215+
$pear_channel->setBaseURL('REST1.3', 'https://pear.php.net/rest/');
216+
//$pear_channel->setBaseURL('REST1.4', 'https://pear.php.net/rest/');
217217
} else {
218218
$pear_channel->setServer('pear.php.net');
219219
$pear_channel->setAlias('pear');
@@ -235,8 +235,8 @@ function _initializeChannelDirs()
235235
$pecl_channel->setServer('pecl.php.net');
236236
$pecl_channel->setSummary('PHP Extension Community Library');
237237
$pecl_channel->setDefaultPEARProtocols();
238-
$pecl_channel->setBaseURL('REST1.0', 'http://pecl.php.net/rest/');
239-
$pecl_channel->setBaseURL('REST1.1', 'http://pecl.php.net/rest/');
238+
$pecl_channel->setBaseURL('REST1.0', 'https://pecl.php.net/rest/');
239+
$pecl_channel->setBaseURL('REST1.1', 'https://pecl.php.net/rest/');
240240
$pecl_channel->setValidationPackage('PEAR_Validator_PECL', '1.0');
241241
} else {
242242
$pecl_channel->setServer('pecl.php.net');
@@ -259,9 +259,9 @@ function _initializeChannelDirs()
259259
$doc_channel->setServer('doc.php.net');
260260
$doc_channel->setSummary('PHP Documentation Team');
261261
$doc_channel->setDefaultPEARProtocols();
262-
$doc_channel->setBaseURL('REST1.0', 'http://doc.php.net/rest/');
263-
$doc_channel->setBaseURL('REST1.1', 'http://doc.php.net/rest/');
264-
$doc_channel->setBaseURL('REST1.3', 'http://doc.php.net/rest/');
262+
$doc_channel->setBaseURL('REST1.0', 'https://doc.php.net/rest/');
263+
$doc_channel->setBaseURL('REST1.1', 'https://doc.php.net/rest/');
264+
$doc_channel->setBaseURL('REST1.3', 'https://doc.php.net/rest/');
265265
} else {
266266
$doc_channel->setServer('doc.php.net');
267267
$doc_channel->setAlias('doc');
@@ -1503,9 +1503,9 @@ function &_getChannel($channel, $noaliases = false)
15031503
$pear_channel->setAlias('pear');
15041504
$pear_channel->setSummary('PHP Extension and Application Repository');
15051505
$pear_channel->setDefaultPEARProtocols();
1506-
$pear_channel->setBaseURL('REST1.0', 'http://pear.php.net/rest/');
1507-
$pear_channel->setBaseURL('REST1.1', 'http://pear.php.net/rest/');
1508-
$pear_channel->setBaseURL('REST1.3', 'http://pear.php.net/rest/');
1506+
$pear_channel->setBaseURL('REST1.0', 'https://pear.php.net/rest/');
1507+
$pear_channel->setBaseURL('REST1.1', 'https://pear.php.net/rest/');
1508+
$pear_channel->setBaseURL('REST1.3', 'https://pear.php.net/rest/');
15091509
return $pear_channel;
15101510
}
15111511

@@ -1519,8 +1519,8 @@ function &_getChannel($channel, $noaliases = false)
15191519
$pear_channel->setAlias('pecl');
15201520
$pear_channel->setSummary('PHP Extension Community Library');
15211521
$pear_channel->setDefaultPEARProtocols();
1522-
$pear_channel->setBaseURL('REST1.0', 'http://pecl.php.net/rest/');
1523-
$pear_channel->setBaseURL('REST1.1', 'http://pecl.php.net/rest/');
1522+
$pear_channel->setBaseURL('REST1.0', 'https://pecl.php.net/rest/');
1523+
$pear_channel->setBaseURL('REST1.1', 'https://pecl.php.net/rest/');
15241524
$pear_channel->setValidationPackage('PEAR_Validator_PECL', '1.0');
15251525
return $pear_channel;
15261526
}
@@ -1536,9 +1536,9 @@ function &_getChannel($channel, $noaliases = false)
15361536
$doc_channel->setAlias('phpdocs');
15371537
$doc_channel->setSummary('PHP Documentation Team');
15381538
$doc_channel->setDefaultPEARProtocols();
1539-
$doc_channel->setBaseURL('REST1.0', 'http://doc.php.net/rest/');
1540-
$doc_channel->setBaseURL('REST1.1', 'http://doc.php.net/rest/');
1541-
$doc_channel->setBaseURL('REST1.3', 'http://doc.php.net/rest/');
1539+
$doc_channel->setBaseURL('REST1.0', 'https://doc.php.net/rest/');
1540+
$doc_channel->setBaseURL('REST1.1', 'https://doc.php.net/rest/');
1541+
$doc_channel->setBaseURL('REST1.3', 'https://doc.php.net/rest/');
15421542
return $doc_channel;
15431543
}
15441544

0 commit comments

Comments
 (0)