Author: csutherl
Date: 2015-04-16 20:34:57 -0400 (Thu, 16 Apr 2015)
New Revision: 2607
Added:
branches/JBOSSWEB_7_5_7_FINAL_BZ-1212566/
Modified:
branches/JBOSSWEB_7_5_7_FINAL_BZ-1212566/src/
branches/JBOSSWEB_7_5_7_FINAL_BZ-1212566/src/main/java/org/apache/catalina/connector/OutputBuffer.java
branches/JBOSSWEB_7_5_7_FINAL_BZ-1212566/src/main/java/org/apache/tomcat/util/buf/ByteChunk.java
Log:
Merge: r2603 [JBWEB-312] Check if the output buffer can grow before flushing it when using
a writer.
Property changes on: branches/JBOSSWEB_7_5_7_FINAL_BZ-1212566
___________________________________________________________________
Added: svn:ignore
+ .settings
output
build.properties
target
Added: svn:mergeinfo
+ /branches/7.5.x:2603
Property changes on: branches/JBOSSWEB_7_5_7_FINAL_BZ-1212566/src
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/8.0.x/src:2529
+ /branches/7.5.x/src:2603
/branches/8.0.x/src:2529
Modified:
branches/JBOSSWEB_7_5_7_FINAL_BZ-1212566/src/main/java/org/apache/catalina/connector/OutputBuffer.java
===================================================================
---
tags/JBOSSWEB_7_5_7_FINAL/src/main/java/org/apache/catalina/connector/OutputBuffer.java 2015-04-14
16:04:20 UTC (rev 2606)
+++
branches/JBOSSWEB_7_5_7_FINAL_BZ-1212566/src/main/java/org/apache/catalina/connector/OutputBuffer.java 2015-04-17
00:34:57 UTC (rev 2607)
@@ -512,7 +512,12 @@
break;
}
if (outputCharChunk.getLength() > 0) {
- bb.flushBuffer();
+ if (bb.getBuffer().length == bb.getEnd() && bb.getLength() <
bb.getLimit()) {
+ // Need to expand output buffer
+ bb.makeSpace(outputCharChunk.getLength());
+ } else {
+ bb.flushBuffer();
+ }
}
}
Modified:
branches/JBOSSWEB_7_5_7_FINAL_BZ-1212566/src/main/java/org/apache/tomcat/util/buf/ByteChunk.java
===================================================================
---
tags/JBOSSWEB_7_5_7_FINAL/src/main/java/org/apache/tomcat/util/buf/ByteChunk.java 2015-04-14
16:04:20 UTC (rev 2606)
+++
branches/JBOSSWEB_7_5_7_FINAL_BZ-1212566/src/main/java/org/apache/tomcat/util/buf/ByteChunk.java 2015-04-17
00:34:57 UTC (rev 2607)
@@ -451,11 +451,11 @@
end=start;
}
- /** Make space for len chars. If len is small, allocate
- * a reserve space too. Never grow bigger than limit.
+ /**
+ * Make space for len chars. If len is small, allocate a reserve space too.
+ * Never grow bigger than limit.
*/
- private void makeSpace(int count)
- {
+ public void makeSpace(int count) {
byte[] tmp = null;
int newSize;
Show replies by date