Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
Servlets Get 2.1.10
-
None
Description
The HtmlRendererServlet of the Default GET Servlets bundle sets the response status if no content can be rendered to 204/NO CONTENT using the HttpServletResponse.sendError method.
This is wrong sind sendError does not directly set the status. Instead it causes the error handler to be called with the status set as a response attribute. In addition, at least in Jetty 8, this causes an IllegalStateException since it looks like Jetty 8 does not like any response data once 204/NO CONTENT is set (which IMHO makes sense).