Add Mark's proposed fix for BZ 45026:
authorrjung <rjung@13f79535-47bb-0310-9956-ffa450edef68>
Fri, 19 Sep 2008 18:51:14 +0000 (18:51 +0000)
committerrjung <rjung@13f79535-47bb-0310-9956-ffa450edef68>
Fri, 19 Sep 2008 18:51:14 +0000 (18:51 +0000)
mod_jk + httpd 2.x fails with a null status message.

Although the problem has been fixed in future httpd and mod_jk
versions, we should also stay safe on the backend side.

git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@697183 13f79535-47bb-0310-9956-ffa450edef68

java/org/apache/jk/common/JkInputStream.java

index c23a103..6186a2c 100644 (file)
@@ -281,6 +281,10 @@ public class JkInputStream implements InputBuffer, OutputBuffer {
         } else {
             message = message.replace('\n', ' ').replace('\r', ' ');
         }
+        if (message == null) {
+            // mod_jk + httpd 2.x fails with a null status message - bug 45026
+            message = Integer.toString(res.getStatus());
+        }
         tempMB.setString( message );
         c2b.convert( tempMB );
         outputMsg.appendBytes(tempMB);