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

Shane Hathaway shane@zope.com
Wed, 9 Apr 2003 10:00:59 -0400


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

Modified Files:
      Tag: Zope-2_6-branch
	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.81.2.6 => 1.81.2.7 ===
--- Zope/lib/python/ZPublisher/HTTPRequest.py:1.81.2.6	Fri Feb 14 18:26:04 2003
+++ Zope/lib/python/ZPublisher/HTTPRequest.py	Wed Apr  9 10:00:27 2003
@@ -134,6 +134,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.