Improve HTTP redirect following#1637
Open
bioball wants to merge 6 commits into
Open
Conversation
bioball
commented
Jun 2, 2026
| return response; | ||
| } | ||
| } | ||
| } |
Member
Author
There was a problem hiding this comment.
This class (RequestRewritingClient) maybe should be renamed. Alternatively, we can implement the redirect following outside of HttpClient (like in HttpUtils).
I don't feel strongly either way, but, food for thought for the future.
This implements HTTP redirect following ourselves. The goal is: 1. All I/O is checked against `--allowed-resources` and `--allowed-modules`, including HTTP redirects 2. HTTP rewrite rules can affect redirect following 3. HTTP headers can affect redirect following
70d95af to
5967a95
Compare
HT154
reviewed
Jun 2, 2026
50f08ca to
2b1100b
Compare
HT154
reviewed
Jun 3, 2026
HT154
approved these changes
Jun 3, 2026
Contributor
HT154
left a comment
There was a problem hiding this comment.
LGTM. We definitely need to document this as a breaking change as previously-valid "inner" redirects may have worked but will now fail. We should update the documentation to reflect the precise behavior here.
Contributor
|
Does this PR address #1163? |
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.
This implements HTTP redirect following ourselves.
The goal is:
--allowed-resourcesand--allowed-modules, including HTTP redirects