Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGreg Wilkins2015-05-21 23:54:27 +0000
committerGreg Wilkins2015-05-21 23:56:51 +0000
commit5bde7f34ea4c538d12adc6c19794b089c768101e (patch)
tree0a242ad0006319b99f44bc9685edda977a20b2ce
parentc7cff6ec7e28f74156d8f78bada08ae5c9cabf48 (diff)
downloadorg.eclipse.jetty.project-5bde7f34ea4c538d12adc6c19794b089c768101e.tar.gz
org.eclipse.jetty.project-5bde7f34ea4c538d12adc6c19794b089c768101e.tar.xz
org.eclipse.jetty.project-5bde7f34ea4c538d12adc6c19794b089c768101e.zip
467936 -w Check HttpOutput aggregateSize is < bufferSize
-rw-r--r--jetty-server/src/main/java/org/eclipse/jetty/server/HttpOutput.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/jetty-server/src/main/java/org/eclipse/jetty/server/HttpOutput.java b/jetty-server/src/main/java/org/eclipse/jetty/server/HttpOutput.java
index c148cdf29c..ddae39cbf7 100644
--- a/jetty-server/src/main/java/org/eclipse/jetty/server/HttpOutput.java
+++ b/jetty-server/src/main/java/org/eclipse/jetty/server/HttpOutput.java
@@ -90,6 +90,11 @@ public class HttpOutput extends ServletOutputStream implements Runnable
HttpConfiguration config = channel.getHttpConfiguration();
_bufferSize = config.getOutputBufferSize();
_commitSize = config.getOutputAggregationSize();
+ if (_commitSize>_bufferSize)
+ {
+ LOG.warn("OutputAggregationSize {} exceeds bufferSize {}",_commitSize,_bufferSize);
+ _commitSize=_bufferSize;
+ }
}
public HttpChannel<?> getHttpChannel()
@@ -350,7 +355,7 @@ public class HttpOutput extends ServletOutputStream implements Runnable
write(_aggregate, complete && len==0);
// 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);
return;

Back to the top