You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by iv...@apache.org on 2010/01/05 17:44:22 UTC

svn commit: r896124 - /wicket/trunk/wicket/src/main/java/org/apache/wicket/protocol/http/WicketServlet.java

Author: ivaynberg
Date: Tue Jan  5 16:44:21 2010
New Revision: 896124

URL: http://svn.apache.org/viewvc?rev=896124&view=rev
Log:
WICKET-2567 wicket leaves file handles open when servlet serves non-wicket resources. johan you suck!
Issue: WICKET-2567

Modified:
    wicket/trunk/wicket/src/main/java/org/apache/wicket/protocol/http/WicketServlet.java

Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/protocol/http/WicketServlet.java
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/protocol/http/WicketServlet.java?rev=896124&r1=896123&r2=896124&view=diff
==============================================================================
--- wicket/trunk/wicket/src/main/java/org/apache/wicket/protocol/http/WicketServlet.java (original)
+++ wicket/trunk/wicket/src/main/java/org/apache/wicket/protocol/http/WicketServlet.java Tue Jan  5 16:44:21 2010
@@ -233,8 +233,14 @@
 			{
 				response.setContentType(mimeType);
 			}
-
-			Streams.copy(stream, response.getOutputStream());
+			try
+			{
+				Streams.copy(stream, response.getOutputStream());
+			}
+			finally
+			{
+				stream.close();
+			}
 		}
 	}