Browse Source

Polishing

pull/29045/head
Arjen Poutsma 2 years ago
parent
commit
8a7e839ad0
  1. 9
      spring-webflux/src/main/java/org/springframework/web/reactive/function/server/DefaultRenderingResponseBuilder.java

9
spring-webflux/src/main/java/org/springframework/web/reactive/function/server/DefaultRenderingResponseBuilder.java

@ -205,11 +205,10 @@ final class DefaultRenderingResponseBuilder implements RenderingResponse.Builder @@ -205,11 +205,10 @@ final class DefaultRenderingResponseBuilder implements RenderingResponse.Builder
}
private void setStatus(View view) {
if (view instanceof RedirectView) {
HttpStatus httpStatus = HttpStatus.resolve(rawStatusCode());
if (httpStatus != null && httpStatus.is3xxRedirection()) {
RedirectView redirectView = (RedirectView) view;
redirectView.setStatusCode(httpStatus);
if (view instanceof RedirectView redirectView) {
HttpStatusCode statusCode = statusCode();
if (statusCode.is3xxRedirection()) {
redirectView.setStatusCode(statusCode);
}
}
}

Loading…
Cancel
Save