Skip to content

Commit 93508b6

Browse files
chore(deps): update ureq requirement from 2.4 to 3.0 (#379)
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]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
1 parent dff9b53 commit 93508b6

File tree

2 files changed

+12
-7
lines changed

2 files changed

+12
-7
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 & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
1+
use anyhow::{bail, Context, Result};
12
use std::{
23
convert::TryFrom,
34
fmt::Display,
45
io::{Cursor, Read, Write},
56
path::{Path, PathBuf},
67
process::Command,
7-
sync::Arc,
88
};
9-
10-
use anyhow::{bail, Context, Result};
9+
use ureq::tls::{TlsConfig, TlsProvider};
1110

1211
use crate::{PHPInfo, PHPProvider};
1312

@@ -194,15 +193,21 @@ impl DevelPack {
194193
if archive { "/archives" } else { "" },
195194
zip_name
196195
);
197-
let response = ureq::AgentBuilder::new()
198-
.tls_connector(Arc::new(native_tls::TlsConnector::new().unwrap()))
196+
let response = ureq::Agent::config_builder()
197+
.tls_config(
198+
TlsConfig::builder()
199+
.provider(TlsProvider::NativeTls)
200+
.build(),
201+
)
199202
.build()
203+
.new_agent()
200204
.get(&url)
201-
.set("User-Agent", USER_AGENT)
205+
.header("User-Agent", USER_AGENT)
202206
.call()
203207
.context("Failed to download development pack")?;
204208
let mut content = vec![];
205209
response
210+
.into_body()
206211
.into_reader()
207212
.read_to_end(&mut content)
208213
.context("Failed to read development pack")?;

0 commit comments

Comments
 (0)