Skip to content

Commit

Permalink
To fix 403 forbidden compiler release downloads, update download_comp…
Browse files Browse the repository at this point in the history
…iler code to set a User-Agent header
  • Loading branch information
ByronBecker committed Feb 7, 2022
1 parent b19be8b commit a2c2d3c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,11 @@ pub fn download_compiler(version: &str) -> Result<PathBuf> {
),
};

let response = reqwest::blocking::get(&target)?;
let client = reqwest::blocking::Client::new();
let response = client
.get(&target)
.header(reqwest::header::USER_AGENT, "vessel")
.send()?;

if !response.status().is_success() {
return Err(anyhow::anyhow!(
Expand Down

0 comments on commit a2c2d3c

Please sign in to comment.