Merge branch 'master' into release

This commit is contained in:
Jesse McConnell 2012-05-24 15:12:53 -05:00
commit 55e268351e
2 changed files with 12 additions and 4 deletions

View File

@ -287,12 +287,20 @@ public class SelectChannelEndPoint extends ChannelEndPoint implements AsyncEndPo
if (idleForMs>_maxIdleTime)
{
// Don't idle out again until onIdleExpired task completes.
setCheckForIdle(false);
_manager.dispatch(new Runnable()
{
public void run()
{
onIdleExpired(idleForMs);
_idleTimestamp=System.currentTimeMillis();
try
{
onIdleExpired(idleForMs);
}
finally
{
setCheckForIdle(true);
}
}
});
}

View File

@ -30,7 +30,6 @@ import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import junit.framework.Assert;
import org.eclipse.jetty.io.EndPoint;
import org.eclipse.jetty.server.handler.AbstractHandler;
@ -39,6 +38,7 @@ import org.eclipse.jetty.util.StringUtil;
import org.eclipse.jetty.util.log.Log;
import org.eclipse.jetty.util.log.StdErrLog;
import org.hamcrest.Matchers;
import org.junit.Assert;
import org.junit.Test;
import org.junit.matchers.JUnitMatchers;
@ -129,7 +129,7 @@ public abstract class HttpServerTestBase extends HttpServerTestFixture
// Read the response.
String response=readResponse(client);
Assert.assertTrue(response.contains("HTTP/1.1 413 FULL head"));
Assert.assertThat(response, Matchers.containsString("HTTP/1.1 413 "));
}
finally
{