Merge branch '5.3.x'

This commit is contained in:
Brian Clozel
2022-09-07 16:58:56 +02:00
2 changed files with 15 additions and 7 deletions

View File

@@ -16,6 +16,8 @@
package org.springframework.web.filter;
import java.io.IOException;
import jakarta.servlet.http.HttpServletResponse;
import jakarta.servlet.http.HttpServletResponseWrapper;
@@ -44,9 +46,11 @@ final class RelativeRedirectResponseWrapper extends HttpServletResponseWrapper {
@Override
public void sendRedirect(String location) {
public void sendRedirect(String location) throws IOException {
resetBuffer();
setStatus(this.redirectStatus.value());
setHeader(HttpHeaders.LOCATION, location);
flushBuffer();
}