Hi *,
while working on SLING-2718 [0] I have noticed something that made me wonder.
In particular if you see [1] I had to comment one line of my test in order to
pass it
public void test_500_errorhandling() throws IOException{
final String expected = "Internal Server Error (500) - custom
error page";
final String url = testNodePath +SELECTOR_500+".html";
assertContains(getContent(url, CONTENT_TYPE_HTML,null,500),
expected);
//assertNotContains(getContent(url,
CONTENT_TYPE_HTML,null,200), "All good");
}
In a nutshell it seems that if there is some servlet that is sending a 500
error (response.sendError(500)) and output something after e.g. "All good"
(maybe this is the wrong part...) and a 500.jsp exists, Sling will "show" both:
- the error page 500.jsp
- and the the extra output (e.g. All good)
Sorry if the questions sounds silly but is this normal or I might have hit some
bug?
Regards
Antonio
[0] https://issues.apache.org/jira/browse/SLING-2718
[1]
https://svn.apache.org/repos/asf/sling/trunk/launchpad/integration-tests/src/main/java/org/apache/sling/launchpad/webapp/integrationtest/servlets/resolver/errorhandler/ErrorHandlingTest.java