From f5fb412eba20f77d1cface3719b5e48e2f5b2d9f Mon Sep 17 00:00:00 2001 From: Jan Bartel Date: Mon, 5 Aug 2013 12:32:21 +1000 Subject: [PATCH] 414235 - RequestLogHandler configured on a context fails to handle forwarded requests --- .../server/handler/RequestLogHandler.java | 35 ++++++++++--------- test-jetty-webapp/pom.xml | 4 +-- 2 files changed, 21 insertions(+), 18 deletions(-) diff --git a/jetty-server/src/main/java/org/eclipse/jetty/server/handler/RequestLogHandler.java b/jetty-server/src/main/java/org/eclipse/jetty/server/handler/RequestLogHandler.java index 426aaded707..b90960fc194 100644 --- a/jetty-server/src/main/java/org/eclipse/jetty/server/handler/RequestLogHandler.java +++ b/jetty-server/src/main/java/org/eclipse/jetty/server/handler/RequestLogHandler.java @@ -69,25 +69,28 @@ public class RequestLogHandler extends HandlerWrapper } finally { - if (continuation.isAsync()) + if (_requestLog != null && baseRequest.getDispatcherType().equals(DispatcherType.REQUEST)) { - if (continuation.isInitial()) - continuation.addContinuationListener(new ContinuationListener() - { - - public void onTimeout(Continuation continuation) + if (continuation.isAsync()) + { + if (continuation.isInitial()) + continuation.addContinuationListener(new ContinuationListener() { - - } - - public void onComplete(Continuation continuation) - { - _requestLog.log(baseRequest, (Response)response); - } - }); + + public void onTimeout(Continuation continuation) + { + + } + + public void onComplete(Continuation continuation) + { + _requestLog.log(baseRequest, (Response)response); + } + }); + } + else + _requestLog.log(baseRequest, (Response)response); } - else - _requestLog.log(baseRequest, (Response)response); } } diff --git a/test-jetty-webapp/pom.xml b/test-jetty-webapp/pom.xml index d1913f20394..0f8a8ae83c6 100644 --- a/test-jetty-webapp/pom.xml +++ b/test-jetty-webapp/pom.xml @@ -95,11 +95,11 @@ -