Repository navigation
Add Redirector.MODE_CLIENT_PERMANENT_STRICT answering 308 (#1746) - #1749
Merged
Merged
Conversation
RFC 9110 section 15.4.9: 308 makes the client repeat the request with the same method and content, unlike 301 which lets a user agent turn a POST into a GET. Status.REDIRECTION_PERMANENT_STRICT existed but nothing could answer with it. New mode (value 5) with the helpers of the other modes: Response, WrapperResponse and ServerResource redirectPermanentStrict, and Router.redirectPermanentStrict. The Javadoc of the 301 helpers no longer promises that the method is kept. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
This was referenced Nov 28, 2026
|
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.




Fixes #1746
RFC 9110 section 15.4.9: 308 makes the client repeat the request with the same method and content, unlike 301 which lets a user agent turn a
POSTinto aGET.Status.REDIRECTION_PERMANENT_STRICTexisted but nothing could answer with it.Redirector.MODE_CLIENT_PERMANENT_STRICT(value 5, unused until now) answers 308 with theLocationheader.redirectPermanentStrict(Reference|String)onResponse,WrapperResponse(delegation) andServerResource, andRouter.redirectPermanentStrict(pathTemplate, targetUri), next to the 301 helpers.MODE_CLIENT_PERMANENTno longer promises that the method is kept.ClientResourceredirection-following for unsafe methods is out of scope.RedirectorTestCase,RouterTestCase,WrapperResponseTestCase,ServerResourceTestCase,ResponseRedirectionTestCase, and a wire-levelPermanentRedirectWireTestCase(POST to a strict route answers 308 withLocation, the 301 route still answers 301).Same fix on the other maintained versions: 3.0: #1747, 2.7: #1748
🤖 Generated with Claude Code