From 07c6830d6cddac59cec23840e840541546de1976 Mon Sep 17 00:00:00 2001 From: Simone Bordet Date: Fri, 6 Nov 2009 15:10:59 +0000 Subject: [PATCH] Draft fix for the test failure. git-svn-id: svn+ssh://dev.eclipse.org/svnroot/rt/org.eclipse.jetty/jetty/trunk@1029 7e9141cc-0065-0410-87d8-b60c137991c4 --- .../org/eclipse/jetty/client/RedirectListener.java | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/jetty-client/src/main/java/org/eclipse/jetty/client/RedirectListener.java b/jetty-client/src/main/java/org/eclipse/jetty/client/RedirectListener.java index e7abb3ef55b..88d589c2873 100644 --- a/jetty-client/src/main/java/org/eclipse/jetty/client/RedirectListener.java +++ b/jetty-client/src/main/java/org/eclipse/jetty/client/RedirectListener.java @@ -80,20 +80,18 @@ public class RedirectListener extends HttpEventListenerWrapper public void onRequestComplete() throws IOException { _requestComplete = true; - checkExchangeComplete(); - - super.onRequestComplete(); + if (checkExchangeComplete()) + super.onRequestComplete(); } public void onResponseComplete() throws IOException { _responseComplete = true; - checkExchangeComplete(); - - super.onResponseComplete(); + if (checkExchangeComplete()) + super.onResponseComplete(); } - public void checkExchangeComplete() throws IOException + private boolean checkExchangeComplete() throws IOException { if (_redirected && _requestComplete && _responseComplete) { @@ -108,12 +106,14 @@ public class RedirectListener extends HttpEventListenerWrapper _exchange.setURI(_location); _destination.resend(_exchange); + return false; } else { setDelegationResult(false); } } + return true; } public void onRetry()