[Zope-Checkins] CVS: Zope/lib/python/ZPublisher - HTTPRequest.py:1.90

Shane Hathaway shane@zope.com
Wed, 9 Apr 2003 16:26:53 -0400


Update of /cvs-repository/Zope/lib/python/ZPublisher
In directory cvs.zope.org:/tmp/cvs-serv1063/lib/python/ZPublisher

Modified Files:
	HTTPRequest.py 
Log Message:
Fixed two leaks involving file uploads.  The HTTP input stream was
referenced for too long.


=== Zope/lib/python/ZPublisher/HTTPRequest.py 1.89 => 1.90 ===
--- Zope/lib/python/ZPublisher/HTTPRequest.py:1.89	Fri Feb 14 18:24:56 2003
+++ Zope/lib/python/ZPublisher/HTTPRequest.py	Wed Apr  9 16:26:22 2003
@@ -130,6 +130,11 @@
         return r
 
     def close(self):
+        # Clear all references to the input stream, possibly
+        # removing tempfiles.
+        self.stdin = None
+        self._file = None
+        self.form.clear()
         # we want to clear the lazy dict here because BaseRequests don't have
         # one.  Without this, there's the possibility of memory leaking
         # after every request.