diff --git a/jetty-ee10/jetty-ee10-servlet/src/main/java/org/eclipse/jetty/ee10/servlet/ServletApiResponse.java b/jetty-ee10/jetty-ee10-servlet/src/main/java/org/eclipse/jetty/ee10/servlet/ServletApiResponse.java index 5037a57493a5..4f6ac985fa9f 100644 --- a/jetty-ee10/jetty-ee10-servlet/src/main/java/org/eclipse/jetty/ee10/servlet/ServletApiResponse.java +++ b/jetty-ee10/jetty-ee10-servlet/src/main/java/org/eclipse/jetty/ee10/servlet/ServletApiResponse.java @@ -186,17 +186,14 @@ public void sendRedirect(int code, String location) throws IOException { Response.sendRedirect(getServletRequestInfo().getRequest(), getResponse(), callback, code, location, false); callback.block(); - closeOutput(); - } - } - public void closeOutput() throws IOException - { - ServletResponseInfo info = getServletResponseInfo(); - if (info.getOutputType() == ServletContextResponse.OutputType.WRITER) - info.getWriter().close(); - else - _servletChannel.getHttpOutput().close(); + // Close the HttpOutput. + ServletResponseInfo info = getServletResponseInfo(); + if (info.getOutputType() == ServletContextResponse.OutputType.WRITER) + info.getWriter().close(); + else + _servletChannel.getHttpOutput().close(); + } } @Override