Remove use of HttpRequestPathHelper

Fixes gh-4387
This commit is contained in:
Rob Winch 2017-06-09 16:37:08 -05:00
parent 6428cb411e
commit 554768f1e4
1 changed files with 1 additions and 6 deletions

View File

@ -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();