Merge branch '6.2.x'

This commit is contained in:
rstoyanchev
2025-04-23 12:11:28 +01:00
4 changed files with 84 additions and 12 deletions

View File

@@ -629,6 +629,17 @@ class UriComponentsBuilderTests {
assertThat(uri.toString()).isEqualTo("ws://example.org:7777/path?q=1#foo");
}
@ParameterizedTest // gh-34783
@EnumSource
void parseBuildAndExpandQueryParamWithSameName(ParserType parserType) {
UriComponents result = UriComponentsBuilder
.fromUriString("/?{pk1}={pv1}&{pk2}={pv2}", parserType)
.buildAndExpand("k1", "v1", "k1", "v2");
assertThat(result.getQuery()).isEqualTo("k1=v1&k1=v2");
assertThat(result.getQueryParams()).containsExactly(Map.entry("k1", List.of("v1", "v2")));
}
@ParameterizedTest
@EnumSource
void buildAndExpandOpaque(ParserType parserType) {