From 554768f1e47f92b3068da8d32f54036f60f6092f Mon Sep 17 00:00:00 2001 From: Rob Winch Date: Fri, 9 Jun 2017 16:37:08 -0500 Subject: [PATCH] Remove use of HttpRequestPathHelper Fixes gh-4387 --- .../util/matcher/PathMatcherServerWebExchangeMatcher.java | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/webflux/src/main/java/org/springframework/security/web/server/util/matcher/PathMatcherServerWebExchangeMatcher.java b/webflux/src/main/java/org/springframework/security/web/server/util/matcher/PathMatcherServerWebExchangeMatcher.java index d07e99c577..882e699526 100644 --- a/webflux/src/main/java/org/springframework/security/web/server/util/matcher/PathMatcherServerWebExchangeMatcher.java +++ b/webflux/src/main/java/org/springframework/security/web/server/util/matcher/PathMatcherServerWebExchangeMatcher.java @@ -26,8 +26,6 @@ import org.springframework.util.AntPathMatcher; import org.springframework.util.Assert; import org.springframework.util.PathMatcher; import org.springframework.web.server.ServerWebExchange; -import org.springframework.web.server.support.HttpRequestPathHelper; -import org.springframework.web.server.support.LookupPath; import reactor.core.publisher.Mono; /** @@ -35,8 +33,6 @@ import reactor.core.publisher.Mono; * @since 5.0 */ public final class PathMatcherServerWebExchangeMatcher implements ServerWebExchangeMatcher { - private HttpRequestPathHelper helper = new HttpRequestPathHelper(); - private PathMatcher pathMatcher = new AntPathMatcher(); private final String pattern; @@ -58,8 +54,7 @@ public final class PathMatcherServerWebExchangeMatcher implements ServerWebExcha if(this.method != null && !this.method.equals(request.getMethod())) { return MatchResult.notMatch(); } - LookupPath lookupPath = helper.getLookupPathForRequest(exchange); - String path = lookupPath.getPath(); + String path = request.getPathWithinApplication(); boolean match = pathMatcher.match(pattern, path); if(!match) { return MatchResult.notMatch();