diff --git a/spring-web/src/main/java/org/springframework/web/server/adapter/ForwardedHeaderTransformer.java b/spring-web/src/main/java/org/springframework/web/server/adapter/ForwardedHeaderTransformer.java index 0903f38a6f..5e33e6d7c7 100644 --- a/spring-web/src/main/java/org/springframework/web/server/adapter/ForwardedHeaderTransformer.java +++ b/spring-web/src/main/java/org/springframework/web/server/adapter/ForwardedHeaderTransformer.java @@ -18,6 +18,7 @@ package org.springframework.web.server.adapter; import java.net.InetSocketAddress; import java.net.URI; +import java.net.URISyntaxException; import java.util.Collections; import java.util.Locale; import java.util.Set; @@ -30,6 +31,7 @@ import org.springframework.lang.Nullable; import org.springframework.util.LinkedCaseInsensitiveMap; import org.springframework.util.StringUtils; import org.springframework.web.util.ForwardedHeaderUtils; +import org.springframework.web.util.UriComponents; /** * Extract values from "Forwarded" and "X-Forwarded-*" headers to override @@ -102,7 +104,7 @@ public class ForwardedHeaderTransformer implements Function