Expose RequestPath in ServerHttpRequest
The new structured getPath() method replaces the existing getContextPath() + getPathWithinApplication(). Issue: SPR-15648
This commit is contained in:
@@ -56,8 +56,6 @@ public class MockServerHttpRequest extends AbstractServerHttpRequest {
|
||||
|
||||
private final HttpMethod httpMethod;
|
||||
|
||||
private final String contextPath;
|
||||
|
||||
private final MultiValueMap<String, HttpCookie> cookies;
|
||||
|
||||
private final InetSocketAddress remoteAddress;
|
||||
@@ -70,9 +68,8 @@ public class MockServerHttpRequest extends AbstractServerHttpRequest {
|
||||
InetSocketAddress remoteAddress,
|
||||
Publisher<? extends DataBuffer> body) {
|
||||
|
||||
super(uri, headers);
|
||||
super(uri, contextPath, headers);
|
||||
this.httpMethod = httpMethod;
|
||||
this.contextPath = contextPath;
|
||||
this.cookies = cookies;
|
||||
this.remoteAddress = remoteAddress;
|
||||
this.body = Flux.from(body);
|
||||
@@ -89,11 +86,6 @@ public class MockServerHttpRequest extends AbstractServerHttpRequest {
|
||||
return this.httpMethod.name();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getContextPath() {
|
||||
return this.contextPath;
|
||||
}
|
||||
|
||||
@Override
|
||||
public InetSocketAddress getRemoteAddress() {
|
||||
return this.remoteAddress;
|
||||
|
||||
Reference in New Issue
Block a user