Bug 1324040 - mozboot: Download rustup without SNI. r=froydnj

It seems older Python (e.g. 2.7 from Ubuntu 14.04) doesn't
support SNI, so we get a TLS error with the canonical
https://static.rust-lang.org/ url even when using the
`requests` module.

Fall back to the no-CNAME host instead which is ugly but works.

Thanks to Simon Sapin for the suggestion.

MozReview-Commit-ID: I6V5ASijuKi

--HG--
extra : rebase_source : 2e2a449fbb3011b51207f1c6baa3d288d0dc774c
This commit is contained in:
Ralph Giles 2016-12-16 10:21:35 -08:00
Родитель e03ddaa2ff
Коммит 57bf0dc91d
1 изменённых файлов: 3 добавлений и 1 удалений

Просмотреть файл

@ -12,7 +12,9 @@ import subprocess
import sys
# Base url for pulling the rustup installer.
RUSTUP_URL_BASE = 'https://static.rust-lang.org/rustup'
# Use the no-CNAME host for compatibilty with Python 2.7
# which doesn't support SNI.
RUSTUP_URL_BASE = 'https://static-rust-lang-org.s3.amazonaws.com/rustup'
# Pull this to get the lastest stable version number.
RUSTUP_MANIFEST = os.path.join(RUSTUP_URL_BASE, 'release-stable.toml')