Author: remy.maucherat(a)jboss.com
Date: 2011-12-19 12:25:14 -0500 (Mon, 19 Dec 2011)
New Revision: 1897
Modified:
trunk/java/org/apache/catalina/connector/OutputBuffer.java
trunk/webapps/docs/changelog.xml
Log:
Fix buffering issue when encoding characters.
Modified: trunk/java/org/apache/catalina/connector/OutputBuffer.java
===================================================================
--- trunk/java/org/apache/catalina/connector/OutputBuffer.java 2011-12-15 16:45:53 UTC
(rev 1896)
+++ trunk/java/org/apache/catalina/connector/OutputBuffer.java 2011-12-19 17:25:14 UTC
(rev 1897)
@@ -465,6 +465,10 @@
outputCharChunk.setChars(buf, off, len);
while (outputCharChunk.getLength() > 0) {
conv.convert(outputCharChunk, bb);
+ if (bb.getLength() == 0) {
+ // Break out of the loop if more chars are needed to produce any output
+ break;
+ }
if (outputCharChunk.getLength() > 0) {
bb.flushBuffer();
}
Modified: trunk/webapps/docs/changelog.xml
===================================================================
--- trunk/webapps/docs/changelog.xml 2011-12-15 16:45:53 UTC (rev 1896)
+++ trunk/webapps/docs/changelog.xml 2011-12-19 17:25:14 UTC (rev 1897)
@@ -16,6 +16,16 @@
<body>
+<section name="JBoss Web 7.0.7.Final (remm)">
+ <subsection name="Catalina">
+ <changelog>
+ <fix>
+ Fix buffering issue when encoding certain characters. (remm)
+ </fix>
+ </changelog>
+ </subsection>
+</section>
+
<section name="JBoss Web 7.0.6.Final (remm)">
<subsection name="Jasper">
<changelog>
Show replies by date