Skip to content

Commit

Permalink
Avoid stripping query parameters from URLs
Browse files Browse the repository at this point in the history
  • Loading branch information
charliermarsh committed Dec 31, 2024
1 parent a2f436f commit 70f0215
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions crates/uv-resolver/src/lock/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3870,7 +3870,6 @@ fn normalize_file_location(location: &FileLocation) -> Result<UrlString, ToUrlEr
/// Convert a [`Url`] into a normalized [`UrlString`].
fn normalize_url(mut url: Url) -> UrlString {
url.set_fragment(None);
url.set_query(None);
UrlString::from(url)
}

Expand Down Expand Up @@ -3995,9 +3994,8 @@ fn normalize_requirement(requirement: Requirement, root: &Path) -> Result<Requir
// Redact the credentials.
redact_credentials(&mut location);

// Remove the fragment and query from the URL; they're already present in the source.
// Remove the fragment from the URL; it's already present in the source.
location.set_fragment(None);
location.set_query(None);

// Reconstruct the PEP 508 URL from the underlying data.
let url = Url::from(ParsedArchiveUrl {
Expand Down

0 comments on commit 70f0215

Please sign in to comment.