Skip to content

Commit

Permalink
Set .metadata suffix on URL path (#2123)
Browse files Browse the repository at this point in the history
## Summary

Ensures that we don't add the `.metadata` suffix after the fragment, if
it exists.
  • Loading branch information
charliermarsh authored Mar 4, 2024
1 parent 5fed1f6 commit 14d968a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion crates/uv-client/src/registry_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,8 @@ impl RegistryClient {
.as_ref()
.is_some_and(pypi_types::DistInfoMetadata::is_available)
{
let url = Url::parse(&format!("{url}.metadata")).map_err(ErrorKind::UrlParseError)?;
let mut url = url.clone();
url.set_path(&format!("{}.metadata", url.path()));

let cache_entry = self.cache.entry(
CacheBucket::Wheels,
Expand Down

0 comments on commit 14d968a

Please sign in to comment.