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

jjlee at codespeak.net jjlee at codespeak.net
Sun May 28 23:11:52 CEST 2006


Author: jjlee
Date: Sun May 28 23:11:50 2006
New Revision: 27803

Modified:
   wwwsearch/mechanize/trunk/mechanize/_urllib2_support.py
Log:
sync AbstractHTTPHandler with Python 2.5 version (tiny cosmetic changes)

Modified: wwwsearch/mechanize/trunk/mechanize/_urllib2_support.py
==============================================================================
--- wwwsearch/mechanize/trunk/mechanize/_urllib2_support.py	(original)
+++ wwwsearch/mechanize/trunk/mechanize/_urllib2_support.py	Sun May 28 23:11:50 2006
@@ -582,7 +582,7 @@
         h = http_class(host) # will parse host:port
         h.set_debuglevel(self._debuglevel)
 
-        headers = req.headers.copy()
+        headers = dict(req.headers)
         headers.update(req.unredirected_hdrs)
         # We want to make an HTTP/1.1 request, but the addinfourl
         # class isn't prepared to deal with a persistent connection.
@@ -609,7 +609,7 @@
         # out of socket._fileobject() and into a base class.
 
         r.recv = r.read
-        fp = socket._fileobject(r, 'rb', -1)
+        fp = socket._fileobject(r)
 
         resp = closeable_response(fp, r.msg, req.get_full_url(),
                                   r.status, r.reason)


More information about the wwwsearch-commits mailing list