467936 -w Check HttpOutput aggregateSize is < bufferSize
This commit is contained in:
parent
c7cff6ec7e
commit
5bde7f34ea
|
@ -90,6 +90,11 @@ public class HttpOutput extends ServletOutputStream implements Runnable
|
||||||
HttpConfiguration config = channel.getHttpConfiguration();
|
HttpConfiguration config = channel.getHttpConfiguration();
|
||||||
_bufferSize = config.getOutputBufferSize();
|
_bufferSize = config.getOutputBufferSize();
|
||||||
_commitSize = config.getOutputAggregationSize();
|
_commitSize = config.getOutputAggregationSize();
|
||||||
|
if (_commitSize>_bufferSize)
|
||||||
|
{
|
||||||
|
LOG.warn("OutputAggregationSize {} exceeds bufferSize {}",_commitSize,_bufferSize);
|
||||||
|
_commitSize=_bufferSize;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public HttpChannel<?> getHttpChannel()
|
public HttpChannel<?> getHttpChannel()
|
||||||
|
@ -350,7 +355,7 @@ public class HttpOutput extends ServletOutputStream implements Runnable
|
||||||
write(_aggregate, complete && len==0);
|
write(_aggregate, complete && len==0);
|
||||||
|
|
||||||
// should we fill aggregate again from the buffer?
|
// should we fill aggregate again from the buffer?
|
||||||
if (len>0 && !complete && len<=_commitSize)
|
if (len>0 && !complete && len<=_commitSize && len<=BufferUtil.space(_aggregate))
|
||||||
{
|
{
|
||||||
BufferUtil.append(_aggregate, b, off, len);
|
BufferUtil.append(_aggregate, b, off, len);
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in New Issue