From: markt Date: Tue, 15 Jul 2008 15:51:44 +0000 (+0000) Subject: As Remy pointed out, this really should be in the finally block. X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=59221f5fe7f9108784d8ac04c863d3f0f53b8fea;p=tomcat7.0 As Remy pointed out, this really should be in the finally block. git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@676944 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/java/org/apache/catalina/servlets/CGIServlet.java b/java/org/apache/catalina/servlets/CGIServlet.java index 1de39acd1..054cc34f3 100644 --- a/java/org/apache/catalina/servlets/CGIServlet.java +++ b/java/org/apache/catalina/servlets/CGIServlet.java @@ -1728,16 +1728,20 @@ public final class CGIServlet extends HttpServlet { } } //replacement for Process.waitFor() - // Close the output stream if used - if (cgiOutput != null) { - cgiOutput.close(); - } } catch (IOException e){ log ("Caught exception " + e); throw e; } finally{ + // Close the output stream if used + if (cgiOutput != null) { + try { + cgiOutput.close(); + } catch (IOException ioe) { + log ("Exception closing output stream " + ioe); + } + } if (debug > 4) { log ("Running finally block"); }