Repository navigation
Honors reserved-character flag for unescaped URI values - #3627
Open
hutiefang76 wants to merge 1 commit into
Open
hutiefang76 wants to merge 1 commit into
hutiefang76 wants to merge 1 commit into
Conversation
Pass the existing allowReservedCharacters flag through the no-triplet path. This encodes raw reserved characters for callers passing false, while keeping true mode, existing percent triplets and flagless overload behavior unchanged. Fixes OpenFeign#3625
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.
UriUtils.encode("a&b=c", false)currently leaves the reserved characters unchanged when the input has no existing percent triplet. This passes the existing flag through that branch, returninga%26b%3Dcfor callers requesting strict encoding.This corrects a public behavior: downstream callers passing
falsenow get encoded reserved characters. True mode, existing%XXtriplets and both flagless overloads retain their behavior. No new API or dependency. Includes regression coverage and a changelog entry.Fixes #3625.
Validation: baseline
UriUtilsTesthad four failures among 32 tests. With the fix,mvn -B -Pdev --toolchains <local-toolchains> -pl core clean installpasses: 792 tests, zero failures/errors, four existing conditional skips. Rootmvn -B -Pdev --toolchains <local-toolchains> validatealso passes. Main compilation uses JDK 8; tests run with actual Temurin 25.0.4.1. The four skips are the existing missing-parameter-name test and three restricted-header property tests.Implemented, tested, independently reviewed and posted with AI assistance for @hutiefang76.