Details
-
Improvement
-
Status: Open
-
Major
-
Resolution: Unresolved
-
Servlets Resolver 2.9.4
-
None
-
None
Description
Currently all errors in the request handling trigger the ErrorHandler in the SlingServletResolver [1], which for all non-JSON requests creates a HTML error page. This can be a heavyweight process as it is possible to render a full-blown error page.
But this effort is often not helpful because this is error page is also rendered for a missing image; in this case the browser does not render the error page returned by this request for the image, but just a placeholder. Same for many other types of errors.
Assuming that a CDN is able to handle all requests with a statuscode 200 already, and then the origin returns a lot of 404 responses, this can be a significant load on the backend, while creating "simple" 404s should be a very lightweight process.
Thus it should be possible to enable a "short-cut" in the error handling, which just sends a very simple error page plus the statuscode in all cases where a full error page is not helpful.