Am 07.11.14 um 18:32 schrieb Bertrand Delacretaz: > On Fri, Nov 7, 2014 at 5:03 PM, Carsten Ziegeler <[email protected]> wrote: >> Am 07.11.14 um 16:21 schrieb Bertrand Delacretaz: >>> ... I think we should set a non-200 HTTP status if an error handler script >>> does not set the it, what do people think? >>> >> I'm not sure - I would imagine that if an error handler can handle the >> error and return a "correct" response, 200 would be a valid status... > > We could wrap the response's setStatus (and related) methods so as to > detect whether the script has explicitly set a status, and if not set > one. > The point is, if a handler creates a valid response it does not call setStatus with the 200 value as it simply assumes that this is the status anyway.
So I think we should leave it up to the error handler to correctly handle the status and not try to be smarter than everyone else. Carsten > Or, if calling response.setStatus several times is allowed (I think > that's the case but haven't tried) simply make an initial call to that > setting the status that the error handler is called for. > > -Bertrand > -- Carsten Ziegeler Adobe Research Switzerland [email protected]
