RfcParser rejects invalid IPv6 host

Fix gh-36787
This commit is contained in:
rstoyanchev
2026-06-08 15:13:43 +02:00
committed by Brian Clozel
parent ba0a9b8923
commit 322eef2942
2 changed files with 10 additions and 3 deletions
@@ -267,7 +267,10 @@ class UriComponentsBuilderTests {
@EnumSource
void fromUriStringInvalidIPv6Host(ParserType parserType) {
assertThatIllegalArgumentException().isThrownBy(() ->
UriComponentsBuilder.fromUriString("http://[1abc:2abc:3abc::5ABC:6abc:8080/resource", parserType));
UriComponentsBuilder.fromUriString("https://[1abc:2abc:3abc::5ABC:6abc:8080/resource", parserType));
assertThatIllegalArgumentException().isThrownBy(() ->
UriComponentsBuilder.fromUriString("https://[1abc:2abc:3abc::5ABC:6abc]resource", parserType));
}
@ParameterizedTest // gh-36759