From e6e4f6f6319b39ba3020f96d070b637054c04b6a Mon Sep 17 00:00:00 2001 From: nsfisis Date: Mon, 4 May 2026 13:59:49 +0900 Subject: feat(http): honor config.cafile and config.capath Composer's config.cafile/config.capath were accepted by the config command but ignored by every HTTP request. Centralize reqwest client construction in mozart_core::http, pre-load the configured CA bundle at startup, and route every callsite (registry, vcs drivers, diagnose, self-update) through the shared builder so user-supplied roots are actually used during HTTPS verification. --- crates/mozart/src/commands/diagnose.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'crates/mozart/src/commands/diagnose.rs') diff --git a/crates/mozart/src/commands/diagnose.rs b/crates/mozart/src/commands/diagnose.rs index bb6e886..2320ddc 100644 --- a/crates/mozart/src/commands/diagnose.rs +++ b/crates/mozart/src/commands/diagnose.rs @@ -92,9 +92,8 @@ async fn check_http_connectivity(url: &str) -> CheckResult { return CheckResult::Skip("COMPOSER_DISABLE_NETWORK is set".to_string()); } - let client = match reqwest::Client::builder() + let client = match mozart_core::http::client_builder() .timeout(std::time::Duration::from_secs(10)) - .user_agent(mozart_core::http::user_agent()) .build() { Ok(c) => c, @@ -120,9 +119,8 @@ async fn check_github_api() -> CheckResult { return CheckResult::Skip("COMPOSER_DISABLE_NETWORK is set".to_string()); } - let client = match reqwest::Client::builder() + let client = match mozart_core::http::client_builder() .timeout(std::time::Duration::from_secs(10)) - .user_agent(mozart_core::http::user_agent()) .build() { Ok(c) => c, -- cgit v1.3.1