1
0
Fork 0
mirror of https://github.com/composer/composer synced 2025-05-11 01:22:54 +00:00

Merge branch '1.1'

This commit is contained in:
Jordi Boggiano 2016-06-25 15:50:18 +01:00
commit 75074382de
2 changed files with 12 additions and 0 deletions

View file

@ -645,6 +645,13 @@ class ComposerRepository extends ArrayRepository implements ConfigurableReposito
$json = $rfs->getContents($hostname, $filename, false);
if ($sha256 && $sha256 !== hash('sha256', $json)) {
// undo downgrade before trying again if http seems to be hijacked or modifying content somehow
if ($this->allowSslDowngrade) {
$this->url = str_replace('http://', 'https://', $this->url);
$this->baseUrl = str_replace('http://', 'https://', $this->baseUrl);
$filename = str_replace('http://', 'https://', $filename);
}
if ($retries) {
usleep(100000);