There is a potential NPE in CGIServlet, even if it's unlikely it may happen. The following patch resolves this problem: Index: F:/Workspace/Apache2/tomcat6/java/org/apache/catalina/servlets/CGIServlet.java =================================================================== --- F:/Workspace/Apache2/tomcat6/java/org/apache/catalina/servlets/CGIServlet.java (revision 548385) +++ F:/Workspace/Apache2/tomcat6/java/org/apache/catalina/servlets/CGIServlet.java (working copy) @@ -1631,7 +1631,6 @@ * with major modifications by Martin Dengler */ Runtime rt = null; - InputStream cgiOutput = null; BufferedReader commandsStdErr = null; BufferedOutputStream commandsStdIn = null; Process proc = null; @@ -1700,7 +1699,9 @@ new HTTPHeaderInputStream(proc.getInputStream()); BufferedReader cgiHeaderReader = new BufferedReader(new InputStreamReader(cgiHeaderStream)); - + + InputStream cgiOutput = null; + while (isRunning) { try { //set headers @@ -1763,7 +1764,10 @@ } //replacement for Process.waitFor() // Close the output stream used - cgiOutput.close(); + if (cgiOutput != null) + { + cgiOutput.close(); + } } catch (IOException e){ log ("Caught exception " + e);
Thanks for the patch. A version of it has been applied to trunk and proposed for 6.0.x
As Mark points out, this is a JAVA bug. It's contingent on the Sun Java instsller to provide msvcr71. This is *NOT* a system library (msvcrt.dll is). In fact MS expects everyone who consumes it to install it privately, which is why it's flagged as a redist. Please, don't waste your time and ours by reopening.
Wrong bug Bill.
Glad this was reopened, and entirely unsure of what bugzilla or firefox just did to me :) Thanks again Nils for this fix
This has been fixed in 6.0.x and is included in 6.0.18 onwards