X-Git-Url: https://code.wpia.club/?p=gigi.git;a=blobdiff_plain;f=lib%2Fjetty%2Forg%2Feclipse%2Fjetty%2Fserver%2Fhandler%2FRequestLogHandler.java;h=00ec275c377400c7f2cb973edfe318b0f6eac766;hp=706b988bffc4398688488cffe787781d461cdd32;hb=ba4f228fa9f72d50991a2218cfd83987ef5d385e;hpb=875b5e9651498a0cd8e0001c0742ba843e47cad0;ds=sidebyside diff --git a/lib/jetty/org/eclipse/jetty/server/handler/RequestLogHandler.java b/lib/jetty/org/eclipse/jetty/server/handler/RequestLogHandler.java index 706b988b..00ec275c 100644 --- a/lib/jetty/org/eclipse/jetty/server/handler/RequestLogHandler.java +++ b/lib/jetty/org/eclipse/jetty/server/handler/RequestLogHandler.java @@ -1,6 +1,6 @@ // // ======================================================================== -// 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 @@ -66,6 +66,9 @@ public class RequestLogHandler extends HandlerWrapper @Override public void onError(AsyncEvent event) throws IOException { + HttpServletResponse response = (HttpServletResponse)event.getAsyncContext().getResponse(); + if (!response.isCommitted()) + response.setStatus(500); } @@ -91,6 +94,12 @@ public class RequestLogHandler extends HandlerWrapper { 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))