Ensure scheme not lowercased if URI variable

Closes gh-33699
This commit is contained in:
rstoyanchev
2024-10-15 20:50:01 +01:00
parent a63cf06496
commit c261ca3102
3 changed files with 26 additions and 8 deletions

View File

@@ -629,6 +629,16 @@ class UriComponentsBuilderTests {
assertThat(result.toUriString()).isEqualTo("mailto:foo@example.com");
}
@ParameterizedTest // gh-33699
@EnumSource(value = ParserType.class)
void schemeVariableMixedCase(ParserType parserType) {
URI uri = UriComponentsBuilder
.fromUriString("{TheScheme}://example.org", parserType)
.buildAndExpand(Map.of("TheScheme", "ws"))
.toUri();
assertThat(uri.toString()).isEqualTo("ws://example.org");
}
@ParameterizedTest
@EnumSource(value = ParserType.class)
void queryParamWithValueWithEquals(ParserType parserType) {