Skip to content

Honors reserved-character flag for unescaped URI values - #3627

Open
hutiefang76 wants to merge 1 commit into
OpenFeign:masterfrom
hutiefang76:frank/thirty-feign-uri-reserved-20261019
Open

hutiefang76 wants to merge 1 commit into
OpenFeign:masterfrom
hutiefang76:frank/thirty-feign-uri-reserved-20261019

Conversation

@hutiefang76

Copy link
Copy Markdown
Contributor

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, returning a%26b%3Dc for callers requesting strict encoding.

This corrects a public behavior: downstream callers passing false now get encoded reserved characters. True mode, existing %XX triplets and both flagless overloads retain their behavior. No new API or dependency. Includes regression coverage and a changelog entry.

Fixes #3625.

Validation: baseline UriUtilsTest had four failures among 32 tests. With the fix, mvn -B -Pdev --toolchains <local-toolchains> -pl core clean install passes: 792 tests, zero failures/errors, four existing conditional skips. Root mvn -B -Pdev --toolchains <local-toolchains> validate also 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.

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

UriUtils ignores allowReservedCharacters=false when the input has no percent triplet

1 participant