You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Radu Cotescu (JIRA)" <ji...@apache.org> on 2015/07/17 16:40:05 UTC

[jira] [Closed] (SLING-4006) [HtmlRendererServlet] Must setStatus(204) instead of sendError(204)

     [ https://issues.apache.org/jira/browse/SLING-4006?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Radu Cotescu closed SLING-4006.
-------------------------------

> [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
>             Fix For: Servlets GET 2.1.12
>
>
> 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)