about summary refs log tree commit diff
diff options
context:
space:
mode:
authorKai Luo <lkail@cn.ibm.com>2022-04-08 14:45:47 +0800
committerKai Luo <lkail@cn.ibm.com>2022-04-08 14:51:05 +0800
commit95b1d71a1bec4a2184a54ef80cbceb4a0fea7665 (patch)
treef4bc5e1bb65ca0eef529525ec2ac37cdeb645862
parente745b4ddbd05026c75aae4506aef39fdfe1603c5 (diff)
[bootstrap.py] Instruct curl to follow redirect
Some RUSTUP_DIST_SERVER perform redirection when downloading
stage0 compiler. Curl should be able to follow that.
-rw-r--r--src/bootstrap/bootstrap.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/bootstrap/bootstrap.py b/src/bootstrap/bootstrap.py
index 0b6bdf47419..ab3d3e00e91 100644
--- a/src/bootstrap/bootstrap.py
+++ b/src/bootstrap/bootstrap.py
@@ -122,6 +122,7 @@ def _download(path, url, probably_big, verbose, exception, help_on_error=None):
             option = "-s"
         require(["curl", "--version"])
         run(["curl", option,
+             "-L", # Follow redirect.
              "-y", "30", "-Y", "10",    # timeout if speed is < 10 bytes/sec for > 30 seconds
              "--connect-timeout", "30",  # timeout if cannot connect within 30 seconds
              "--retry", "3", "-Sf", "-o", path, url],