Hi, Am Dienstag, den 29.01.2008, 08:41 +0100 schrieb Bertrand Delacretaz: > On Jan 29, 2008 8:28 AM, Felix Meschberger <[EMAIL PROTECTED]> wrote: > > > ...If the response has already been committed at the time the infinte loop > > detection aborts processing, it is not possible to send 500 any more.... > > In my case it is not committed yet - I added a check for isCommitted() > in Response.setStatus(), and that doesn't bark. > > > ...In the Servlet API it is not allowed for included requests > > to set headers (I understand this such that included requests are also > > not able to set the response status code), while in Sling this > > restriction does not exist.... > > Ok, so the 500 should work in my example, I'll investigate further. > > That might be a case where the HttpStatusCodeException that we had in > microsling might come handy ;-)
Yep .... On the other hand throwing a SlingException (or better an extension thereof) should actually get through up to the outermost SlingMainServlet.service method and be handled with a 500. If not, this would be an implementation issue in the SlingMainServlet.include method eating up SlingExceptions (or RuntimeExceptions at large) Regards Felix
