Repository navigation
perf(client): only re-parse the response URL after a redirect - #3124
Open
patrick-immometrica wants to merge 2 commits into
Open
patrick-immometrica wants to merge 2 commits into
patrick-immometrica wants to merge 2 commits into
Conversation
patrick-immometrica
marked this pull request as ready for review
October 24, 2026 23:30
Byron
pushed a commit
to GitoxideLabs/gitoxide
that referenced
this pull request
Nov 16, 2026
Port the source worktree commit into `gix-reqwest`, retaining its author. Retarget Rust crate paths and preserve upstream formatting. Original source message: perf(client): only re-parse the response URL after a redirect <!-- agent --> Transplanted from seanmonstar/reqwest#3124. Original commit: f079b71656dab2ab61f6545d5d66231e22ff9aa7. Included in the reqwest patch stack for Gitoxide transport correctness, security, or transfer efficiency. The source patch is preserved; local changes are kept in separate commits. <!-- original message --> perf(client): only re-parse the response URL after a redirect Port validation: library, proxy, redirect, blocking, and client tests pass with the stable optional features enabled; external TLS-info tests are excluded. Reqwest-Patch: 65ed14e531b2feb034704b4d51ea8ab9844066ec
Byron
pushed a commit
to GitoxideLabs/gitoxide
that referenced
this pull request
Nov 16, 2026
Port the source worktree commit into `gix-reqwest`, retaining its author. Retarget Rust crate paths and preserve upstream formatting. Original source message: perf(client): only re-parse the response URL after a redirect <!-- agent --> Transplanted from seanmonstar/reqwest#3124. Original commit: f079b71656dab2ab61f6545d5d66231e22ff9aa7. Included in the reqwest patch stack for Gitoxide transport correctness, security, or transfer efficiency. The source patch is preserved; local changes are kept in separate commits. <!-- original message --> perf(client): only re-parse the response URL after a redirect Port validation: library, proxy, redirect, blocking, and client tests pass with the stable optional features enabled; external TLS-info tests are excluded. Reqwest-Patch: 65ed14e531b2feb034704b4d51ea8ab9844066ec
Byron
pushed a commit
to GitoxideLabs/gitoxide
that referenced
this pull request
Nov 16, 2026
Port the source worktree commit into `gix-reqwest`, retaining its author. Retarget Rust crate paths and preserve upstream formatting. Port validation: library, proxy, redirect, blocking, and client tests pass with the stable optional features enabled; external TLS-info tests are excluded. Reqwest-Patch: 65ed14e531b2feb034704b4d51ea8ab9844066ec Reqwest-PR: seanmonstar/reqwest#3124 Original source message: perf(client): only re-parse the response URL after a redirect <!-- agent --> Transplanted from seanmonstar/reqwest#3124. Original commit: f079b71656dab2ab61f6545d5d66231e22ff9aa7. Included in the reqwest patch stack for Gitoxide transport correctness, security, or transfer efficiency. The source patch is preserved; local changes are kept in separate commits. <!-- original message --> perf(client): only re-parse the response URL after a redirect
Byron
pushed a commit
to GitoxideLabs/gitoxide
that referenced
this pull request
Nov 16, 2026
Port the source worktree commit into `gix-reqwest`, retaining its author. Retarget Rust crate paths and preserve upstream formatting. Port validation: library, proxy, redirect, blocking, and client tests pass with the stable optional features enabled; external TLS-info tests are excluded. Reqwest-Patch: 65ed14e531b2feb034704b4d51ea8ab9844066ec Reqwest-PR: seanmonstar/reqwest#3124 Original source message: perf(client): only re-parse the response URL after a redirect <!-- agent --> Transplanted from seanmonstar/reqwest#3124. Original commit: f079b71656dab2ab61f6545d5d66231e22ff9aa7. Included in the reqwest patch stack for Gitoxide transport correctness, security, or transfer efficiency. The source patch is preserved; local changes are kept in separate commits. <!-- original message --> perf(client): only re-parse the response URL after a redirect
Byron
pushed a commit
to GitoxideLabs/gitoxide
that referenced
this pull request
Nov 16, 2026
Port the source worktree commit into `gix-reqwest`, retaining its author. Retarget Rust crate paths and preserve upstream formatting. Port validation: library, proxy, redirect, blocking, and client tests pass with the stable optional features enabled; external TLS-info tests are excluded. Reqwest-Patch: 65ed14e531b2feb034704b4d51ea8ab9844066ec Reqwest-PR: seanmonstar/reqwest#3124 Original source message: perf(client): only re-parse the response URL after a redirect <!-- agent --> Transplanted from seanmonstar/reqwest#3124. Original commit: f079b71656dab2ab61f6545d5d66231e22ff9aa7. Included in the reqwest patch stack for Gitoxide transport correctness, security, or transfer efficiency. The source patch is preserved; local changes are kept in separate commits. <!-- original message --> perf(client): only re-parse the response URL after a redirect
Byron
pushed a commit
to GitoxideLabs/gitoxide
that referenced
this pull request
Nov 16, 2026
Port the source worktree commit into `gix-reqwest`, retaining its author. Retarget Rust crate paths and preserve upstream formatting. Port validation: library, proxy, redirect, blocking, and client tests pass with the stable optional features enabled; external TLS-info tests are excluded. Reqwest-Patch: 65ed14e531b2feb034704b4d51ea8ab9844066ec Reqwest-PR: seanmonstar/reqwest#3124 Original source message: perf(client): only re-parse the response URL after a redirect <!-- agent --> Transplanted from seanmonstar/reqwest#3124. Original commit: f079b71656dab2ab61f6545d5d66231e22ff9aa7. Included in the reqwest patch stack for Gitoxide transport correctness, security, or transfer efficiency. The source patch is preserved; local changes are kept in separate commits. <!-- original message --> perf(client): only re-parse the response URL after a redirect
Byron
pushed a commit
to GitoxideLabs/gitoxide
that referenced
this pull request
Nov 18, 2026
Port the source worktree commit into `gix-reqwest`, retaining its author. Retarget Rust crate paths and preserve upstream formatting. Port validation: library, proxy, redirect, blocking, and client tests pass with the stable optional features enabled; external TLS-info tests are excluded. Reqwest-Patch: 65ed14e531b2feb034704b4d51ea8ab9844066ec Reqwest-PR: seanmonstar/reqwest#3124 Original source message: perf(client): only re-parse the response URL after a redirect <!-- agent --> Transplanted from seanmonstar/reqwest#3124. Original commit: f079b71656dab2ab61f6545d5d66231e22ff9aa7. Included in the reqwest patch stack for Gitoxide transport correctness, security, or transfer efficiency. The source patch is preserved; local changes are kept in separate commits. <!-- original message --> perf(client): only re-parse the response URL after a redirect
Byron
pushed a commit
to GitoxideLabs/gitoxide
that referenced
this pull request
Nov 20, 2026
Port the source worktree commit into `gix-reqwest`, retaining its author. Retarget Rust crate paths and preserve upstream formatting. Port validation: library, proxy, redirect, blocking, and client tests pass with the stable optional features enabled; external TLS-info tests are excluded. Reqwest-Patch: 65ed14e531b2feb034704b4d51ea8ab9844066ec Reqwest-PR: seanmonstar/reqwest#3124 Original source message: perf(client): only re-parse the response URL after a redirect <!-- agent --> Transplanted from seanmonstar/reqwest#3124. Original commit: f079b71656dab2ab61f6545d5d66231e22ff9aa7. Included in the reqwest patch stack for Gitoxide transport correctness, security, or transfer efficiency. The source patch is preserved; local changes are kept in separate commits. <!-- original message --> perf(client): only re-parse the response URL after a redirect
Byron
pushed a commit
to GitoxideLabs/gitoxide
that referenced
this pull request
Nov 24, 2026
Port the source worktree commit into `gix-reqwest`, retaining its author. Retarget Rust crate paths and preserve upstream formatting. Port validation: library, proxy, redirect, blocking, and client tests pass with the stable optional features enabled; external TLS-info tests are excluded. Reqwest-Patch: 65ed14e531b2feb034704b4d51ea8ab9844066ec Reqwest-PR: seanmonstar/reqwest#3124 Original source message: perf(client): only re-parse the response URL after a redirect <!-- agent --> Transplanted from seanmonstar/reqwest#3124. Original commit: f079b71656dab2ab61f6545d5d66231e22ff9aa7. Included in the reqwest patch stack for Gitoxide transport correctness, security, or transfer efficiency. The source patch is preserved; local changes are kept in separate commits. <!-- original message --> perf(client): only re-parse the response URL after a redirect
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
FollowRedirect puts a RequestUri extension on every response, not only on redirected ones. PendingRequest turned that Uri into a string and re-parsed it with Url::parse on every request. Without a redirect, the result is just the request URL minus the fragment.
Now it compares the Uri to the request URL up to the query. If they match, it only clears the fragment. If they differ, it parses as before. Behavior is unchanged: the fragment is still dropped.
A micro benchmark puts the to_string + parse at 0.7–1 µs and the comparison at under 0.1 µs, so this saves under 1 µs per request. Small, but it's on every request.
The test checks res.url() for a plain request and for one with a fragment.