Felix Meschberger created SLING-4006:
----------------------------------------

             Summary: [HtmlRendererServlet] Must setStatus(204) instead of 
sendError(204)
                 Key: SLING-4006
                 URL: https://issues.apache.org/jira/browse/SLING-4006
             Project: Sling
          Issue Type: Bug
          Components: Servlets
    Affects Versions: Servlets Get 2.1.10
            Reporter: Felix Meschberger
            Assignee: Felix Meschberger


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).



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to