Initialize RequestPath on demand
Closes gh-33227
This commit is contained in:
@@ -198,7 +198,7 @@ class ServerHttpRequestTests {
|
||||
void mutateContextPathWithoutUpdatingPathShouldFail() throws Exception {
|
||||
ServerHttpRequest request = createRequest("/context/path", "/context");
|
||||
|
||||
assertThatThrownBy(() -> request.mutate().contextPath("/fail").build())
|
||||
assertThatThrownBy(() -> request.mutate().contextPath("/fail").build().getPath())
|
||||
.isInstanceOf(IllegalArgumentException.class)
|
||||
.hasMessage("Invalid contextPath '/fail': must match the start of requestPath: '/context/path'");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user