Fix double encoding in `DefaultApiVersionInserter` by xyraclius · Pull Request #36097 · spring-projects/spring-framework

@xyraclius xyraclius changed the title Fix double encoding in DefaultApiVersionInserter Fix double encoding in DefaultApiVersionInserter

Jan 5, 2026

rstoyanchev

@xyraclius

Ensure that the DefaultApiVersionInserter does not re-encode existing parts of the input URI by using the 'encoded' flag in UriComponentsBuilder.

This prevents percent-encoded characters (like %20) from being incorrectly double-encoded to %2520 during the version insertion process.

Closes spring-projectsgh-36080

Signed-off-by: Nabil Fawwaz Elqayyim <master@nabilfawwaz.com>

rstoyanchev pushed a commit that referenced this pull request

Jan 9, 2026
Ensure that the DefaultApiVersionInserter does not re-encode existing parts
of the input URI by using the 'encoded' flag in UriComponentsBuilder.

This prevents percent-encoded characters (like %20) from being incorrectly
double-encoded to %2520 during the version insertion process.

See gh-36097

Signed-off-by: Nabil Fawwaz Elqayyim <master@nabilfawwaz.com>