Skip to content

Commit 5cbd29e

Browse files
dependabot[bot]Xenira
authored andcommitted
chore(deps): update ureq requirement from 2.4 to 3.0
Updates the requirements on [ureq](https://github.com/algesten/ureq) to permit the latest version. - [Changelog](https://github.com/algesten/ureq/blob/main/CHANGELOG.md) - [Commits](algesten/ureq@2.4.0...3.0.7) --- updated-dependencies: - dependency-name: ureq dependency-type: direct:production ... Signed-off-by: dependabot[bot] <[email protected]>
1 parent 911d2ee commit 5cbd29e

File tree

2 files changed

+12
-6
lines changed

2 files changed

+12
-6
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ cc = "1.0"
2929
skeptic = "0.13"
3030

3131
[target.'cfg(windows)'.build-dependencies]
32-
ureq = { version = "2.4", features = [
32+
ureq = { version = "3.0", features = [
3333
"native-tls",
3434
"gzip",
3535
], default-features = false }

windows_build.rs

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
use anyhow::{bail, Context, Result};
12
use std::{
23
convert::TryFrom,
34
fmt::Display,
@@ -6,8 +7,7 @@ use std::{
67
process::Command,
78
sync::Arc,
89
};
9-
10-
use anyhow::{bail, Context, Result};
10+
use ureq::tls::{TlsConfig, TlsProvider};
1111

1212
use crate::{PHPInfo, PHPProvider};
1313

@@ -194,15 +194,21 @@ impl DevelPack {
194194
if archive { "/archives" } else { "" },
195195
zip_name
196196
);
197-
let response = ureq::AgentBuilder::new()
198-
.tls_connector(Arc::new(native_tls::TlsConnector::new().unwrap()))
197+
let response = ureq::Agent::config_builder()
198+
.tls_config(
199+
TlsConfig::builder()
200+
.provider(TlsProvider::NativeTls)
201+
.build(),
202+
)
199203
.build()
204+
.new_agent()
200205
.get(&url)
201-
.set("User-Agent", USER_AGENT)
206+
.header("User-Agent", USER_AGENT)
202207
.call()
203208
.context("Failed to download development pack")?;
204209
let mut content = vec![];
205210
response
211+
.into_body()
206212
.into_reader()
207213
.read_to_end(&mut content)
208214
.context("Failed to read development pack")?;

0 commit comments

Comments
 (0)