diff --git a/src/main/java/io/openliberty/website/SecurityFilter.java b/src/main/java/io/openliberty/website/SecurityFilter.java index 936377809f..0a03ca5950 100644 --- a/src/main/java/io/openliberty/website/SecurityFilter.java +++ b/src/main/java/io/openliberty/website/SecurityFilter.java @@ -109,8 +109,10 @@ public void doFilter(ServletRequest req, ServletResponse resp, FilterChain chain req.getRequestDispatcher(uri.concat(".gz")).include(req, response); } catch(FileNotFoundException e) { - response.setStatus(HttpServletResponse.SC_NOT_FOUND); - response.sendRedirect("/404.html"); + response.reset(); + response.setHeader("Content-Type", "text/html"); + response.sendError(404); + return; } } } else if (uri.startsWith("/api/builds/") || uri.startsWith("/api/github/")) {