mirror of https://github.com/astral-sh/uv
Add some verbose logging to the registry_client.rs
This commit is contained in:
parent
14d968ac22
commit
614db77944
|
|
@ -377,6 +377,7 @@ impl CachedClient {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
debug!("send_cached: {:?}", req);
|
||||||
Ok(match cached.cache_policy.before_request(&mut req) {
|
Ok(match cached.cache_policy.before_request(&mut req) {
|
||||||
BeforeRequest::Fresh => {
|
BeforeRequest::Fresh => {
|
||||||
debug!("Found fresh response for: {}", req.url());
|
debug!("Found fresh response for: {}", req.url());
|
||||||
|
|
|
||||||
|
|
@ -263,6 +263,9 @@ impl RegistryClient {
|
||||||
.header("Accept", MediaType::accepts())
|
.header("Accept", MediaType::accepts())
|
||||||
.build()
|
.build()
|
||||||
.map_err(ErrorKind::from)?;
|
.map_err(ErrorKind::from)?;
|
||||||
|
|
||||||
|
debug!("simple_single_index: {:?}", simple_request);
|
||||||
|
|
||||||
let parse_simple_response = |response: Response| {
|
let parse_simple_response = |response: Response| {
|
||||||
async {
|
async {
|
||||||
// Use the response URL, rather than the request URL, as the base for relative URLs.
|
// Use the response URL, rather than the request URL, as the base for relative URLs.
|
||||||
|
|
@ -425,6 +428,7 @@ impl RegistryClient {
|
||||||
.get(url.clone())
|
.get(url.clone())
|
||||||
.build()
|
.build()
|
||||||
.map_err(ErrorKind::from)?;
|
.map_err(ErrorKind::from)?;
|
||||||
|
debug!("wheel_metadata_registry: {:?}", req);
|
||||||
Ok(self
|
Ok(self
|
||||||
.client
|
.client
|
||||||
.get_serde(req, &cache_entry, cache_control, response_callback)
|
.get_serde(req, &cache_entry, cache_control, response_callback)
|
||||||
|
|
@ -471,6 +475,8 @@ impl RegistryClient {
|
||||||
.build()
|
.build()
|
||||||
.map_err(ErrorKind::from)?;
|
.map_err(ErrorKind::from)?;
|
||||||
|
|
||||||
|
debug!("wheel_metadata_no_pep658: {:?}", req);
|
||||||
|
|
||||||
// Copy authorization headers from the HEAD request to subsequent requests
|
// Copy authorization headers from the HEAD request to subsequent requests
|
||||||
let mut headers = HeaderMap::default();
|
let mut headers = HeaderMap::default();
|
||||||
if let Some(authorization) = req.headers().get("authorization") {
|
if let Some(authorization) = req.headers().get("authorization") {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue