bip 01/10/23 17:03:04
Modified: catalina/src/share/org/apache/catalina/servlets
SsiInvokerServlet.java
Log:
Some of the inputstream being used was not explicity closed.
PR: 4361
Submitted by: rami.hanninen <at> davisor.com
Revision Changes Path
1.11 +9 -6
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/servlets/SsiInvokerServlet.java
Index: SsiInvokerServlet.java
===================================================================
RCS file:
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/servlets/SsiInvokerServlet.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- SsiInvokerServlet.java 2001/10/19 18:39:18 1.10
+++ SsiInvokerServlet.java 2001/10/24 00:03:04 1.11
@@ -1,8 +1,8 @@
/*
* SsiInvokerServlet.java
- * $Header:
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/servlets/SsiInvokerServlet.java,v
1.10 2001/10/19 18:39:18 bip Exp $
- * $Revision: 1.10 $
- * $Date: 2001/10/19 18:39:18 $
+ * $Header:
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/servlets/SsiInvokerServlet.java,v
1.11 2001/10/24 00:03:04 bip Exp $
+ * $Revision: 1.11 $
+ * $Date: 2001/10/24 00:03:04 $
*
* ====================================================================
*
@@ -99,7 +99,7 @@
*
* @author Bip Thelin
* @author Amy Roh
- * @version $Revision: 1.10 $, $Date: 2001/10/19 18:39:18 $
+ * @version $Revision: 1.11 $, $Date: 2001/10/24 00:03:04 $
*/
public final class SsiInvokerServlet extends HttpServlet {
/** Debug level for this servlet. */
@@ -285,7 +285,10 @@
while ((len = in.read(buf)) != -1)
soonOut.write(buf, 0, len);
- soonOut.close();
+ try { in.close(); } catch (IOException e) { ; }
+ try { resourceInputStream.close(); } catch (IOException e) { ; }
+ try { soonOut.close(); } catch (IOException e) { ; }
+
byte[] unparsed = soonOut.toByteArray();
soonOut = null; buf = null;
while (bIdx < unparsed.length) {
@@ -335,7 +338,7 @@
if (buffered)
((ServletOutputStreamWrapper)out).writeTo(res.getOutputStream());
- out = null;
+ try { out.close(); } catch (IOException e) { ; }
}
/**