[Bug 294345] minor fix to previous patch for this bugzilla issue
git-svn-id: svn+ssh://dev.eclipse.org/svnroot/rt/org.eclipse.jetty/jetty/trunk@1042 7e9141cc-0065-0410-87d8-b60c137991c4
This commit is contained in:
parent
c2f081ae8c
commit
1da3065043
|
@ -37,6 +37,7 @@ jetty-7.0.1-SNAPSHOT
|
||||||
+ Fixed client abort asocciation
|
+ Fixed client abort asocciation
|
||||||
+ CQ-3581 jetty OSGi contribution
|
+ CQ-3581 jetty OSGi contribution
|
||||||
+ Moved centralized logging and verifier back to sandbox
|
+ Moved centralized logging and verifier back to sandbox
|
||||||
|
+ 294345 Support for HTTP/301 + HTTP/302 response codes
|
||||||
|
|
||||||
jetty-7.0.0.v20091005 5 October 2009
|
jetty-7.0.0.v20091005 5 October 2009
|
||||||
291340 Race condition in onException() notifications
|
291340 Race condition in onException() notifications
|
||||||
|
|
|
@ -80,24 +80,28 @@ public class RedirectListener extends HttpEventListenerWrapper
|
||||||
public void onRequestComplete() throws IOException
|
public void onRequestComplete() throws IOException
|
||||||
{
|
{
|
||||||
_requestComplete = true;
|
_requestComplete = true;
|
||||||
|
|
||||||
if (checkExchangeComplete())
|
if (checkExchangeComplete())
|
||||||
|
{
|
||||||
super.onRequestComplete();
|
super.onRequestComplete();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onResponseComplete() throws IOException
|
public void onResponseComplete() throws IOException
|
||||||
{
|
{
|
||||||
_responseComplete = true;
|
_responseComplete = true;
|
||||||
|
|
||||||
if (checkExchangeComplete())
|
if (checkExchangeComplete())
|
||||||
|
{
|
||||||
super.onResponseComplete();
|
super.onResponseComplete();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean checkExchangeComplete() throws IOException
|
public boolean checkExchangeComplete()
|
||||||
|
throws IOException
|
||||||
{
|
{
|
||||||
if (_redirected && _requestComplete && _responseComplete)
|
if (_redirected && _requestComplete && _responseComplete)
|
||||||
{
|
{
|
||||||
setDelegatingRequests(true);
|
|
||||||
setDelegatingResponses(true);
|
|
||||||
|
|
||||||
if (_location != null)
|
if (_location != null)
|
||||||
{
|
{
|
||||||
if (_location.indexOf("://")>0)
|
if (_location.indexOf("://")>0)
|
||||||
|
@ -106,6 +110,7 @@ public class RedirectListener extends HttpEventListenerWrapper
|
||||||
_exchange.setURI(_location);
|
_exchange.setURI(_location);
|
||||||
|
|
||||||
_destination.resend(_exchange);
|
_destination.resend(_exchange);
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -113,6 +118,7 @@ public class RedirectListener extends HttpEventListenerWrapper
|
||||||
setDelegationResult(false);
|
setDelegationResult(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -18,11 +18,13 @@ import java.io.IOException;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.io.OutputStream;
|
import java.io.OutputStream;
|
||||||
import java.io.PrintWriter;
|
import java.io.PrintWriter;
|
||||||
|
|
||||||
import javax.servlet.ServletException;
|
import javax.servlet.ServletException;
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
import junit.framework.TestCase;
|
import junit.framework.TestCase;
|
||||||
|
|
||||||
import org.eclipse.jetty.client.security.Realm;
|
import org.eclipse.jetty.client.security.Realm;
|
||||||
import org.eclipse.jetty.client.security.SimpleRealmResolver;
|
import org.eclipse.jetty.client.security.SimpleRealmResolver;
|
||||||
import org.eclipse.jetty.http.HttpMethods;
|
import org.eclipse.jetty.http.HttpMethods;
|
||||||
|
|
Loading…
Reference in New Issue