Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ cc = "1.0"
skeptic = "0.13"

[target.'cfg(windows)'.build-dependencies]
ureq = { version = "2.4", features = [
ureq = { version = "3.0", features = [
"native-tls",
"gzip",
], default-features = false }
Expand Down
17 changes: 11 additions & 6 deletions windows_build.rs
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
use anyhow::{bail, Context, Result};
use std::{
convert::TryFrom,
fmt::Display,
io::{Cursor, Read, Write},
path::{Path, PathBuf},
process::Command,
sync::Arc,
};

use anyhow::{bail, Context, Result};
use ureq::tls::{TlsConfig, TlsProvider};

use crate::{PHPInfo, PHPProvider};

Expand Down Expand Up @@ -194,15 +193,21 @@ impl DevelPack {
if archive { "/archives" } else { "" },
zip_name
);
let response = ureq::AgentBuilder::new()
.tls_connector(Arc::new(native_tls::TlsConnector::new().unwrap()))
let response = ureq::Agent::config_builder()
.tls_config(
TlsConfig::builder()
.provider(TlsProvider::NativeTls)
.build(),
)
.build()
.new_agent()
.get(&url)
.set("User-Agent", USER_AGENT)
.header("User-Agent", USER_AGENT)
.call()
.context("Failed to download development pack")?;
let mut content = vec![];
response
.into_body()
.into_reader()
.read_to_end(&mut content)
.context("Failed to read development pack")?;
Expand Down