[wwwsearch-commits] r32290 - wwwsearch/mechanize/trunk/mechanize

jjlee at codespeak.net jjlee at codespeak.net
Thu Sep 14 02:19:14 CEST 2006


Author: jjlee
Date: Thu Sep 14 02:19:12 2006
New Revision: 32290

Modified:
   wwwsearch/mechanize/trunk/mechanize/_mechanize.py
Log:
Temporary work-around for problem with partially-read responses in History (duncan.booth at suttoncourtenay.org.uk)

Modified: wwwsearch/mechanize/trunk/mechanize/_mechanize.py
==============================================================================
--- wwwsearch/mechanize/trunk/mechanize/_mechanize.py	(original)
+++ wwwsearch/mechanize/trunk/mechanize/_mechanize.py	Thu Sep 14 02:19:12 2006
@@ -168,6 +168,14 @@
 ##             # acceptable.
 ##             raise
         self.set_response(response)
+
+        # XXX
+        # Temporary hack to eagerly read data (otherwise, History can contain
+        # closed and partially-read responses).  Proper fix is for responses to
+        # know if they're partially read or not; .back() should then .reload()
+        # if required.
+        response.get_data()
+
         if not success:
             raise error
         return copy.copy(self._response)


More information about the wwwsearch-commits mailing list