fixed merge

This commit is contained in:
Greg Wilkins 2013-10-28 10:17:55 +11:00
parent 121e725740
commit 979ddd958b
1 changed files with 5 additions and 14 deletions

View File

@ -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;
} }