Use WHAT_WG uri parser type

See https://github.com/spring-projects/spring-framework/issues/33639
This commit is contained in:
Ryan Baxter
2024-10-15 14:47:39 -04:00
parent b8d542d139
commit 5165ea59f6

View File

@@ -356,8 +356,10 @@ public class ConfigClientProperties {
if (ObjectUtils.isEmpty(userInfo) || ":".equals(userInfo)) {
return result;
}
String bare = UriComponentsBuilder.fromHttpUrl(uri).userInfo(null).build().toUriString();
result.uri = bare;
result.uri = UriComponentsBuilder.fromUriString(uri, UriComponentsBuilder.ParserType.WHAT_WG)
.userInfo(null)
.build()
.toUriString();
// if userInfo does not contain a :, then append a : to it
if (!userInfo.contains(":")) {