fixed merge

This commit is contained in:
Greg Wilkins 2014-08-01 09:51:57 +10:00
parent b439549793
commit 78165ce5ff
1 changed files with 13 additions and 5 deletions

View File

@ -434,11 +434,19 @@ public class HttpConnection extends AbstractConnection implements Runnable, Http
@Override
public void send(ResponseInfo info, ByteBuffer content, boolean lastContent, Callback callback)
{
// If we are still expecting a 100 continues when we commit
if (info!=null && _channel.isExpecting100Continue())
// then we can't be persistent
_generator.setPersistent(false);
if (info==null&&!lastContent&&BufferUtil.isEmpty(content))XXXXX else
if (info == null)
{
if (!lastContent && BufferUtil.isEmpty(content))
callback.succeeded();
}
else
{
// If we are still expecting a 100 continues when we commit
if (_channel.isExpecting100Continue())
// then we can't be persistent
_generator.setPersistent(false);
}
if(_sendCallback.reset(info,content,lastContent,callback))
_sendCallback.iterate();
}