//
// ========================================================================
-// Copyright (c) 1995-2014 Mort Bay Consulting Pty. Ltd.
+// Copyright (c) 1995-2016 Mort Bay Consulting Pty. Ltd.
// ------------------------------------------------------------------------
// All rights reserved. This program and the accompanying materials
// are made available under the terms of the Eclipse Public License v1.0
@Override
public void onError(AsyncEvent event) throws IOException
{
+ HttpServletResponse response = (HttpServletResponse)event.getAsyncContext().getResponse();
+ if (!response.isCommitted())
+ response.setStatus(500);
}
{
super.handle(target, baseRequest, request, response);
}
+ catch(Error|IOException|ServletException|RuntimeException e)
+ {
+ if (!response.isCommitted() && !baseRequest.getHttpChannelState().isAsync())
+ response.setStatus(500);
+ throw e;
+ }
finally
{
if (_requestLog != null && baseRequest.getDispatcherType().equals(DispatcherType.REQUEST))