remm 02/04/01 09:50:46 Modified: http11/src/java/org/apache/coyote/http11 InternalOutputBuffer.java Log: - Fix problems handling null strings. - isNull wasn't a good way to test the type of the MB (use getType instead). Revision Changes Path 1.12 +6 -4 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.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- InternalOutputBuffer.java 28 Mar 2002 02:34:11 -0000 1.11 +++ InternalOutputBuffer.java 1 Apr 2002 17:50:46 -0000 1.12 @@ -545,12 +545,11 @@ protected void write(MessageBytes mb) { mb.toBytes(); - ByteChunk bc = mb.getByteChunk(); - if (!bc.isNull()) { - // Writing the byte chunk to the output buffer + + if (mb.getType() == MessageBytes.T_BYTES) { + ByteChunk bc = mb.getByteChunk(); write(bc); } else { - // Using toString write(mb.toString()); } @@ -582,6 +581,9 @@ * @param s data to be written */ protected void write(String s) { + + if (s == null) + return; // From the Tomcat 3.3 HTTP/1.0 connector int len = s.length();
-- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>