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

Joerg Hoh updated SLING-13413:
------------------------------
    Summary: SlingServletResolver: provide simple error handlers for 
non-HTML/non-JSON requests  (was: SlingServletResolver: provide simple error 
handlers for non-HTML requests)

> SlingServletResolver: provide simple error handlers for non-HTML/non-JSON 
> requests
> ----------------------------------------------------------------------------------
>
>                 Key: SLING-13413
>                 URL: https://issues.apache.org/jira/browse/SLING-13413
>             Project: Sling
>          Issue Type: Improvement
>    Affects Versions: Servlets Resolver 3.0.10
>            Reporter: Joerg Hoh
>            Assignee: Joerg Hoh
>            Priority: Major
>
> Right now, when a request to a non-HTML resource fails, the 
> DefaultErrorServlet is resolved, which in most cases is not built to 
> explicitly handle requests to non-HTML resources and therefor always returns 
> either JSON (if the accept header indicates JSON) or HTML for eveything else.
> In that case, a request to /content/non-existing-image.png will often returns 
> the HTML error page, even if the browser indicated in the accept header, that 
> it won't handle text/html  for this request. Next to potential security 
> problems this can cause performance problems if the creation of the error 
> page is expensive.
> We need to have a dedicated handling for non-JSON and non-HTML responses, 
> which just set the statuscode. No response body is required in these cases.



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to