-
Bug
-
Resolution: Fixed
-
Trivial
-
4.0
-
None
This is really trivial, the problem is just a spurious log.info().
In RenderingFilter there is a catch for IOExceptions while streaming back resources. The exception is swallowed since it's typically a ClientAbortException (can happen). But after the catch there is no "return" and the flow continues just like the resource was not found.
The filter tries to forward to the 404 page, than it catches another exception due to the closed stream and log another info.
catch (IOException e) { // don't log at error level since tomcat tipically throws a // org.apache.catalina.connector.ClientAbortException if the user stops loading the page log.debug("Exception while dispatching resource " + e.getClass().getName() + ": " + e.getMessage(), e); //$NON-NLS-1$ //$NON-NLS-2$ } catch (Exception e) { log.error("Exception while dispatching resource " + e.getClass().getName() + ": " + e.getMessage(), e); //$NON-NLS-1$ //$NON-NLS-2$ } finally { IOUtils.closeQuietly(is); } // missing return here } log.debug("Resource not found, redirecting request for [{}] to 404 URI", request.getRequestURI()); //$NON-NLS-1$ if (!response.isCommitted()) { response.sendError(HttpServletResponse.SC_NOT_FOUND); } else { log.info("Unable to redirect to 404 page, response is already committed"); //$NON-NLS-1$ }
Acceptance criteria