Skip to content

Commit

Permalink
Auto merge of rust-lang#95796 - bzEq:bzEq/curl-redirect, r=Dylan-DPC
Browse files Browse the repository at this point in the history
[bootstrap.py] Instruct curl to follow redirect

Some mirror RUSTUP_DIST_SERVER (like https://mirrors.sjtug.sjtu.edu.cn/rust-static) perform redirection when downloading
stage0 compiler. Curl should be able to follow that.
  • Loading branch information
bors committed Apr 11, 2022
2 parents 625e4dd + 95b1d71 commit 90ca447
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/bootstrap/bootstrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -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],
Expand Down

0 comments on commit 90ca447

Please sign in to comment.