mirror of
https://github.com/jetty/jetty.project.git
synced 2025-03-03 20:39:18 +00:00
jetty-9 more commit fixes
This commit is contained in:
parent
ff76201050
commit
6d2da78aac
@ -1132,7 +1132,6 @@ public class HttpParser
|
||||
}
|
||||
|
||||
LOG.debug("shutdownInput {}",this);
|
||||
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------------------------- */
|
||||
|
@ -185,13 +185,6 @@ public class HttpConnection extends AbstractConnection
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void fillInterested()
|
||||
{
|
||||
// new Throwable().printStackTrace();
|
||||
super.fillInterested();
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------ */
|
||||
/** Parse and handle HTTP messages.
|
||||
* <p>
|
||||
@ -215,9 +208,6 @@ public class HttpConnection extends AbstractConnection
|
||||
// TODO try to generalize this loop into AbstractConnection
|
||||
while (true)
|
||||
{
|
||||
// synchronized (_lock)
|
||||
{
|
||||
|
||||
// Fill the request buffer with data only if it is totally empty.
|
||||
if (BufferUtil.isEmpty(_requestBuffer))
|
||||
{
|
||||
@ -289,7 +279,6 @@ public class HttpConnection extends AbstractConnection
|
||||
_channel.getEventHandler().badMessage(HttpStatus.REQUEST_ENTITY_TOO_LARGE_413,null);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch(IOException e)
|
||||
{
|
||||
@ -414,9 +403,6 @@ public class HttpConnection extends AbstractConnection
|
||||
BufferUtil.clear(_responseBuffer);
|
||||
getEndPoint().shutdownOutput();
|
||||
_generator.abort();
|
||||
|
||||
// set fill interested so we seek the real close
|
||||
fillInterested();
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
@ -434,7 +420,6 @@ public class HttpConnection extends AbstractConnection
|
||||
|
||||
LOG.debug("{} completed");
|
||||
|
||||
|
||||
// Handle connection upgrades
|
||||
if (getResponse().getStatus()==HttpStatus.SWITCHING_PROTOCOLS_101)
|
||||
{
|
||||
@ -490,6 +475,12 @@ public class HttpConnection extends AbstractConnection
|
||||
getEndPoint().shutdownOutput();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// make sure that an oshut connection is driven towards close
|
||||
// TODO this is a little ugly
|
||||
if (getEndPoint().isOpen() && getEndPoint().isOutputShutdown())
|
||||
fillInterested();
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------ */
|
||||
|
@ -1037,8 +1037,9 @@ public abstract class HttpServerTestBase extends HttpServerTestFixture
|
||||
assertTrue(in.indexOf("\r\n0\r\n")==-1); // chunking is interrupted by error close
|
||||
|
||||
client.close();
|
||||
Thread.sleep(100);
|
||||
System.err.println(handler._endp);
|
||||
Thread.sleep(200);
|
||||
|
||||
// TODO this sometimes fails for SSL ???
|
||||
assertTrue(!handler._endp.isOpen());
|
||||
}
|
||||
finally
|
||||
|
@ -651,6 +651,7 @@ public class ResponseTest
|
||||
|
||||
private Response newResponse()
|
||||
{
|
||||
_channel.getOutputStream().reset();
|
||||
Response response = new Response(_channel);
|
||||
return response;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user