Author: remy.maucherat(a)jboss.com
Date: 2011-11-14 11:51:36 -0500 (Mon, 14 Nov 2011)
New Revision: 1865
Modified:
branches/3.0.x/java/org/apache/coyote/ajp/AjpMessage.java
branches/3.0.x/java/org/apache/coyote/http11/InternalAprOutputBuffer.java
branches/3.0.x/java/org/apache/coyote/http11/InternalOutputBuffer.java
Log:
- Filter out multibyte chars when writing a char chunk.
Modified: branches/3.0.x/java/org/apache/coyote/ajp/AjpMessage.java
===================================================================
--- branches/3.0.x/java/org/apache/coyote/ajp/AjpMessage.java 2011-11-14 16:51:24 UTC (rev
1864)
+++ branches/3.0.x/java/org/apache/coyote/ajp/AjpMessage.java 2011-11-14 16:51:36 UTC (rev
1865)
@@ -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: branches/3.0.x/java/org/apache/coyote/http11/InternalAprOutputBuffer.java
===================================================================
--- branches/3.0.x/java/org/apache/coyote/http11/InternalAprOutputBuffer.java 2011-11-14
16:51:24 UTC (rev 1864)
+++ branches/3.0.x/java/org/apache/coyote/http11/InternalAprOutputBuffer.java 2011-11-14
16:51:36 UTC (rev 1865)
@@ -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: branches/3.0.x/java/org/apache/coyote/http11/InternalOutputBuffer.java
===================================================================
--- branches/3.0.x/java/org/apache/coyote/http11/InternalOutputBuffer.java 2011-11-14
16:51:24 UTC (rev 1864)
+++ branches/3.0.x/java/org/apache/coyote/http11/InternalOutputBuffer.java 2011-11-14
16:51:36 UTC (rev 1865)
@@ -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;
}
Show replies by date