From 614db779445f90efafcdecb39a97953c0d0e6439 Mon Sep 17 00:00:00 2001 From: Charlie Marsh Date: Mon, 4 Mar 2024 16:26:51 -0500 Subject: [PATCH] Add some verbose logging to the registry_client.rs --- crates/uv-client/src/cached_client.rs | 1 + crates/uv-client/src/registry_client.rs | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/crates/uv-client/src/cached_client.rs b/crates/uv-client/src/cached_client.rs index 495ca84cd..e305fd44a 100644 --- a/crates/uv-client/src/cached_client.rs +++ b/crates/uv-client/src/cached_client.rs @@ -377,6 +377,7 @@ impl CachedClient { ); } } + debug!("send_cached: {:?}", req); Ok(match cached.cache_policy.before_request(&mut req) { BeforeRequest::Fresh => { debug!("Found fresh response for: {}", req.url()); diff --git a/crates/uv-client/src/registry_client.rs b/crates/uv-client/src/registry_client.rs index 7ae8c95b0..4aa6f2cf9 100644 --- a/crates/uv-client/src/registry_client.rs +++ b/crates/uv-client/src/registry_client.rs @@ -263,6 +263,9 @@ impl RegistryClient { .header("Accept", MediaType::accepts()) .build() .map_err(ErrorKind::from)?; + + debug!("simple_single_index: {:?}", simple_request); + let parse_simple_response = |response: Response| { async { // Use the response URL, rather than the request URL, as the base for relative URLs. @@ -425,6 +428,7 @@ impl RegistryClient { .get(url.clone()) .build() .map_err(ErrorKind::from)?; + debug!("wheel_metadata_registry: {:?}", req); Ok(self .client .get_serde(req, &cache_entry, cache_control, response_callback) @@ -471,6 +475,8 @@ impl RegistryClient { .build() .map_err(ErrorKind::from)?; + debug!("wheel_metadata_no_pep658: {:?}", req); + // Copy authorization headers from the HEAD request to subsequent requests let mut headers = HeaderMap::default(); if let Some(authorization) = req.headers().get("authorization") {