Author: remy.maucherat(a)jboss.com
Date: 2011-11-14 11:51:24 -0500 (Mon, 14 Nov 2011)
New Revision: 1864
Modified:
trunk/java/org/apache/coyote/ajp/AjpMessage.java
trunk/java/org/apache/coyote/http11/InternalAprOutputBuffer.java
trunk/java/org/apache/coyote/http11/InternalOutputBuffer.java
trunk/webapps/docs/changelog.xml
Log:
- Filter out multibyte chars when writing a char chunk.
Modified: trunk/java/org/apache/coyote/ajp/AjpMessage.java
===================================================================
--- trunk/java/org/apache/coyote/ajp/AjpMessage.java 2011-11-10 09:37:41 UTC (rev 1863)
+++ trunk/java/org/apache/coyote/ajp/AjpMessage.java 2011-11-14 16:51:24 UTC (rev 1864)
@@ -218,10 +218,8 @@
// but is the only consistent approach within the current
// servlet framework. It must suffice until servlet output
// streams properly encode their output.
- if ((c <= 31) && (c != 9)) {
+ if (((c <= 31) && (c != 9)) || c == 127 || c > 255) {
c = ' ';
- } else if (c == 127) {
- c = ' ';
}
appendByte(c);
}
Modified: trunk/java/org/apache/coyote/http11/InternalAprOutputBuffer.java
===================================================================
--- trunk/java/org/apache/coyote/http11/InternalAprOutputBuffer.java 2011-11-10 09:37:41
UTC (rev 1863)
+++ trunk/java/org/apache/coyote/http11/InternalAprOutputBuffer.java 2011-11-14 16:51:24
UTC (rev 1864)
@@ -630,10 +630,8 @@
// but is the only consistent approach within the current
// servlet framework. It must suffice until servlet output
// streams properly encode their output.
- if ((c <= 31) && (c != 9)) {
+ if (((c <= 31) && (c != 9)) || c == 127 || c > 255) {
c = ' ';
- } else if (c == 127) {
- c = ' ';
}
buf[pos++] = (byte) c;
}
Modified: trunk/java/org/apache/coyote/http11/InternalOutputBuffer.java
===================================================================
--- trunk/java/org/apache/coyote/http11/InternalOutputBuffer.java 2011-11-10 09:37:41 UTC
(rev 1863)
+++ trunk/java/org/apache/coyote/http11/InternalOutputBuffer.java 2011-11-14 16:51:24 UTC
(rev 1864)
@@ -645,10 +645,8 @@
// but is the only consistent approach within the current
// servlet framework. It must suffice until servlet output
// streams properly encode their output.
- if ((c <= 31) && (c != 9)) {
+ if (((c <= 31) && (c != 9)) || c == 127 || c > 255) {
c = ' ';
- } else if (c == 127) {
- c = ' ';
}
buf[pos++] = (byte) c;
}
Modified: trunk/webapps/docs/changelog.xml
===================================================================
--- trunk/webapps/docs/changelog.xml 2011-11-10 09:37:41 UTC (rev 1863)
+++ trunk/webapps/docs/changelog.xml 2011-11-14 16:51:24 UTC (rev 1864)
@@ -24,6 +24,13 @@
</update>
</changelog>
</subsection>
+ <subsection name="Coyote">
+ <changelog>
+ <fix>
+ Filter out multibyte chars when writing a char chunk. (rjung)
+ </fix>
+ </changelog>
+ </subsection>
</section>
<section name="JBoss Web 7.0.3.Final (remm)">
Show replies by date