feat: add RedirectPlan for validating and following redirects - #13901
Merged
Conversation
algebraic-dev
changed the base branch from
master
to
sofia/async-http-replayable-body
May 30, 2026 13:12
|
Mathlib CI status (docs):
|
Collaborator
|
Reference manual CI status:
|
TwoFX
reviewed
Jun 5, 2026
algebraic-dev
force-pushed
the
sofia/async-http-redirect-plan
branch
from
June 5, 2026 13:52
dbd4cc6 to
ee33e6e
Compare
algebraic-dev
force-pushed
the
sofia/async-http-redirect-plan
branch
from
June 5, 2026 14:00
ee33e6e to
03468f6
Compare
algebraic-dev
force-pushed
the
sofia/async-http-redirect-plan
branch
from
June 5, 2026 14:37
a42f923 to
f8ecc1c
Compare
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
ecyrbe
reviewed
Jun 14, 2026
Comment on lines
+366
to
+370
| let scrubbed := RedirectPlan.scrubHeaders request.headers isCrossOrigin methodChanged | ||
| let newHeaders := | ||
| if isCrossOrigin then | ||
| RedirectPlan.rewriteHostHeader scrubbed newOrigin | ||
| else scrubbed |
Contributor
There was a problem hiding this comment.
This is really great. It's usually one of the big security issues when issuing redirections.
This is so important for security that i wonder if some proof of adherance to spec could be added just for this ?
…ia/async-http-redirect-plan
TwoFX
reviewed
Jun 25, 2026
TwoFX
reviewed
Jun 25, 2026
TwoFX
approved these changes
Jun 30, 2026
…ia/async-http-replayable-body
algebraic-dev
changed the base branch from
sofia/async-http-replayable-body
to
master
July 22, 2026 00:20
…ia/async-http-redirect-plan
robsimmons
pushed a commit
that referenced
this pull request
Jul 29, 2026
This PR adds a `RedirectPlan` type that uses the RFC9110 logic to validate redirect responses and automatically redirect. --------- Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
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 PR adds a
RedirectPlantype that uses the RFC9110 logic to validate redirect responses and automatically redirect.