The HttpServlet.doHead method is protected void doHead(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { NoBodyResponse response = new NoBodyResponse(resp); doGet(req, response); response.setContentLength(); } where class NoBodyResponse implements HttpServletResponse {...} This breaks older versions of Jetty if a head request is passed to a request dispatcher. This is because Jetty used to enforce the SRV 8.2 and the javadoc for RequestDispatcher that says * The request and response parameters must be either the same * objects as were passed to the calling servlet's service method or be * subclasses of the {@link ServletRequestWrapper} or * {@link ServletResponseWrapper} classes that wrap them. Thus the doHead mechanism breaks this because NoBodyResponse does not extend HttpServletResponseWrapper. The NoBodyResponse should extend the wrapper, so that containers can enforce the SRC8.2 if they wish.
*** This bug has been marked as a duplicate of 22290 ***