From 9d6b9f19a5dddf25d67ed4b754b1b1826a03d8c6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 27 Feb 2025 21:10:19 +0000 Subject: [PATCH] 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](https://github.com/algesten/ureq/compare/2.4.0...3.0.7) --- updated-dependencies: - dependency-name: ureq dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- Cargo.toml | 2 +- windows_build.rs | 17 +++++++++++------ 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 12d9e89fbf..78afd3e843 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -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 } diff --git a/windows_build.rs b/windows_build.rs index 607cdcc348..ce2db78d21 100644 --- a/windows_build.rs +++ b/windows_build.rs @@ -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}; @@ -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")?;