Author: remy.maucherat(a)jboss.com
Date: 2011-11-14 11:51:49 -0500 (Mon, 14 Nov 2011)
New Revision: 1866
Modified:
branches/2.1.x/java/org/apache/coyote/ajp/AjpMessage.java
branches/2.1.x/java/org/apache/coyote/http11/InternalAprOutputBuffer.java
branches/2.1.x/java/org/apache/coyote/http11/InternalOutputBuffer.java
Log:
- Filter out multibyte chars when writing a char chunk.
Modified: branches/2.1.x/java/org/apache/coyote/ajp/AjpMessage.java
===================================================================
--- branches/2.1.x/java/org/apache/coyote/ajp/AjpMessage.java 2011-11-14 16:51:36 UTC (rev
1865)
+++ branches/2.1.x/java/org/apache/coyote/ajp/AjpMessage.java 2011-11-14 16:51:49 UTC (rev
1866)
@@ -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/2.1.x/java/org/apache/coyote/http11/InternalAprOutputBuffer.java
===================================================================
--- branches/2.1.x/java/org/apache/coyote/http11/InternalAprOutputBuffer.java 2011-11-14
16:51:36 UTC (rev 1865)
+++ branches/2.1.x/java/org/apache/coyote/http11/InternalAprOutputBuffer.java 2011-11-14
16:51:49 UTC (rev 1866)
@@ -628,10 +628,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/2.1.x/java/org/apache/coyote/http11/InternalOutputBuffer.java
===================================================================
--- branches/2.1.x/java/org/apache/coyote/http11/InternalOutputBuffer.java 2011-11-14
16:51:36 UTC (rev 1865)
+++ branches/2.1.x/java/org/apache/coyote/http11/InternalOutputBuffer.java 2011-11-14
16:51:49 UTC (rev 1866)
@@ -643,10 +643,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