changeset 921:a5af9ee7cf91

remove isExpired()
author Franklin Schmidt <fschmidt@gmail.com>
date Sun, 09 Oct 2016 18:09:50 -0600
parents 3268ddf919d4
children 03f39c8abd6b
files src/org/eclipse/jetty/continuation/Continuation.java src/org/eclipse/jetty/server/AbstractHttpConnection.java src/org/eclipse/jetty/server/AsyncContinuation.java src/org/eclipse/jetty/server/handler/ContextHandler.java
diffstat 4 files changed, 4 insertions(+), 27 deletions(-) [+]
line wrap: on
line diff
diff -r 3268ddf919d4 -r a5af9ee7cf91 src/org/eclipse/jetty/continuation/Continuation.java
--- a/src/org/eclipse/jetty/continuation/Continuation.java	Sun Oct 09 03:51:31 2016 -0600
+++ b/src/org/eclipse/jetty/continuation/Continuation.java	Sun Oct 09 18:09:50 2016 -0600
@@ -328,7 +328,7 @@
 	 * @return true after a request has been redispatched as the result of a
 	 *         timeout. Returns false after any subsequent call to suspend.
 	 */
-	boolean isExpired();
+//	boolean isExpired();
 
 	/* ------------------------------------------------------------ */
 	/**
diff -r 3268ddf919d4 -r a5af9ee7cf91 src/org/eclipse/jetty/server/AbstractHttpConnection.java
--- a/src/org/eclipse/jetty/server/AbstractHttpConnection.java	Sun Oct 09 03:51:31 2016 -0600
+++ b/src/org/eclipse/jetty/server/AbstractHttpConnection.java	Sun Oct 09 18:09:50 2016 -0600
@@ -463,16 +463,7 @@
 					}
 					else
 					{
-						if (_request._async.isExpired()&&!was_continuation)
-						{
-							async_exception = (Throwable)_request.getAttribute(RequestDispatcher.ERROR_EXCEPTION);
-							_response.setStatus(500,async_exception==null?"Async Timeout":"Async Exception");
-							_request.setAttribute(RequestDispatcher.ERROR_STATUS_CODE,new Integer(500));
-							_request.setAttribute(RequestDispatcher.ERROR_MESSAGE, _response.getReason());
-							_request.setDispatcherType(DispatcherType.ERROR);
-						}
-						else
-							_request.setDispatcherType(DispatcherType.ASYNC);
+						_request.setDispatcherType(DispatcherType.ASYNC);
 						server.handleAsync(this);
 					}
 				}
diff -r 3268ddf919d4 -r a5af9ee7cf91 src/org/eclipse/jetty/server/AsyncContinuation.java
--- a/src/org/eclipse/jetty/server/AsyncContinuation.java	Sun Oct 09 03:51:31 2016 -0600
+++ b/src/org/eclipse/jetty/server/AsyncContinuation.java	Sun Oct 09 18:09:50 2016 -0600
@@ -83,7 +83,6 @@
 	private int _state;
 	private boolean _initial;
 	private boolean _resumed;
-	private boolean _expired;
 	private volatile boolean _responseWrapped;
 	private long _timeoutMs=DEFAULT_TIMEOUT;
 	private AsyncEventState _event;
@@ -262,8 +261,7 @@
 												(_state==__COMPLETED)?"COMPLETE":
 													("UNKNOWN?"+_state))+
 			(_initial?",initial":"")+
-			(_resumed?",resumed":"")+
-			(_expired?",expired":"");
+			(_resumed?",resumed":"");
 		}
 	}
 
@@ -468,7 +466,6 @@
 			}
 			_initial = true;
 			_resumed=false;
-			_expired=false;
 			_responseWrapped=false;
 			cancelTimeout();
 			_timeoutMs=DEFAULT_TIMEOUT;
@@ -677,17 +674,6 @@
 			return _resumed;
 		}
 	}
-	/* ------------------------------------------------------------ */
-	/**
-	 * @see Continuation#isExpired()
-	 */
-	public boolean isExpired()
-	{
-		synchronized (this)
-		{
-			return _expired;
-		}
-	}
 
 	/* ------------------------------------------------------------ */
 	/**
diff -r 3268ddf919d4 -r a5af9ee7cf91 src/org/eclipse/jetty/server/handler/ContextHandler.java
--- a/src/org/eclipse/jetty/server/handler/ContextHandler.java	Sun Oct 09 03:51:31 2016 -0600
+++ b/src/org/eclipse/jetty/server/handler/ContextHandler.java	Sun Oct 09 18:09:50 2016 -0600
@@ -930,7 +930,7 @@
 		if (old_context != _scontext)
 		{
 			// check the target.
-			if (DispatcherType.REQUEST.equals(dispatch) || DispatcherType.ASYNC.equals(dispatch) || (DispatcherType.ERROR.equals(dispatch) && baseRequest.getAsyncContinuation().isExpired()))
+			if (DispatcherType.REQUEST.equals(dispatch) || DispatcherType.ASYNC.equals(dispatch))
 			{
 				if (_compactPath)
 					target = URIUtil.compactPath(target);