fixed merge
This commit is contained in:
parent
121e725740
commit
979ddd958b
|
@ -40,7 +40,6 @@ import org.eclipse.jetty.util.BufferUtil;
|
||||||
import org.eclipse.jetty.util.resource.Resource;
|
import org.eclipse.jetty.util.resource.Resource;
|
||||||
import org.hamcrest.Matchers;
|
import org.hamcrest.Matchers;
|
||||||
import org.junit.After;
|
import org.junit.After;
|
||||||
import org.junit.Assert;
|
|
||||||
import org.junit.Before;
|
import org.junit.Before;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
|
@ -409,7 +408,6 @@ public class HttpOutputTest
|
||||||
boolean _async;
|
boolean _async;
|
||||||
ByteBuffer _buffer;
|
ByteBuffer _buffer;
|
||||||
byte[] _bytes;
|
byte[] _bytes;
|
||||||
ByteBuffer _content;
|
|
||||||
InputStream _contentInputStream;
|
InputStream _contentInputStream;
|
||||||
ReadableByteChannel _contentChannel;
|
ReadableByteChannel _contentChannel;
|
||||||
ByteBuffer _content;
|
ByteBuffer _content;
|
||||||
|
@ -422,16 +420,6 @@ public class HttpOutputTest
|
||||||
|
|
||||||
final HttpOutput out = (HttpOutput) response.getOutputStream();
|
final HttpOutput out = (HttpOutput) response.getOutputStream();
|
||||||
|
|
||||||
if (_content!=null)
|
|
||||||
{
|
|
||||||
response.setContentLength(_content.remaining());
|
|
||||||
if (_content.hasArray())
|
|
||||||
out.write(_content.array(),_content.arrayOffset()+_content.position(),_content.remaining());
|
|
||||||
else
|
|
||||||
out.sendContent(_content);
|
|
||||||
_content=null;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (_contentInputStream!=null)
|
if (_contentInputStream!=null)
|
||||||
{
|
{
|
||||||
|
@ -545,10 +533,13 @@ public class HttpOutputTest
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (_content!=null)
|
if (_content!=null)
|
||||||
{
|
{
|
||||||
out.sendContent(_content);
|
response.setContentLength(_content.remaining());
|
||||||
|
if (_content.hasArray())
|
||||||
|
out.write(_content.array(),_content.arrayOffset()+_content.position(),_content.remaining());
|
||||||
|
else
|
||||||
|
out.sendContent(_content);
|
||||||
_content=null;
|
_content=null;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue