remm 2003/09/11 00:03:58 Modified: http11/src/java/org/apache/coyote/http11 InternalOutputBuffer.java Log: - Filter out all control chars from the response header, as mandated by the HTTP specification. Revision Changes Path 1.18 +9 -2 jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/InternalOutputBuffer.java Index: InternalOutputBuffer.java =================================================================== RCS file: /home/cvs/jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/InternalOutputBuffer.java,v retrieving revision 1.17 retrieving revision 1.18 diff -u -r1.17 -r1.18 --- InternalOutputBuffer.java 22 May 2003 18:21:08 -0000 1.17 +++ InternalOutputBuffer.java 11 Sep 2003 07:03:58 -0000 1.18 @@ -429,7 +429,6 @@ if (message == null) { write(HttpMessages.getMessage(status)); } else { - message = message.replace('\n', ' ').replace('\r', ' '); write(message); } @@ -492,7 +491,7 @@ */ public void endHeaders() { - write(Constants.CRLF); + write(Constants.CRLF_BYTES); } @@ -629,6 +628,14 @@ // High order byte must be zero //log("Header character is not iso8859_1, " + //"not supported yet: " + c, Log.ERROR ) ; + } + if (c != 9) { + if ((c >= 0) && (c <= 31)) { + c = ' '; + } + if (c == 127) { + c = ' '; + } } buf[pos++] = (byte) c; }
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]