Fixed NPE in HttpsRedirectWebFilter
A more descriptive IllegalStateException is now thrown instead in the case that no such port mapping exists. Fixes: gh-6639
This commit is contained in:
committed by
Josh Cummings
parent
8dd2864dea
commit
281ccff907
@@ -112,6 +112,12 @@ public class HttpsRedirectWebFilterTests {
|
||||
verify(portMapper).lookupHttpsPort(314);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void filterWhenRequestIsInsecureAndNoPortMappingThenThrowsIllegalState() {
|
||||
ServerWebExchange exchange = get("http://localhost:1234");
|
||||
assertThatCode(() -> this.filter.filter(exchange, this.chain).block())
|
||||
.isInstanceOf(IllegalStateException.class);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void filterWhenInsecureRequestHasAPathThenRedirects() {
|
||||
|
||||
Reference in New Issue
Block a user