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

jjlee at codespeak.net jjlee at codespeak.net
Sun May 28 23:00:59 CEST 2006


Author: jjlee
Date: Sun May 28 23:00:58 2006
New Revision: 27802

Modified:
   wwwsearch/mechanize/trunk/mechanize/_urllib2_support.py
Log:
Tiny cleanup

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:00:58 2006
@@ -36,7 +36,8 @@
 
 
 # This adds "refresh" to the list of redirectables and provides a redirection
-# algorithm that doesn't go into a loop in the presence of cookies.
+# algorithm that doesn't go into a loop in the presence of cookies
+# (Python 2.4 has this new algorithm, 2.3 doesn't).
 class HTTPRedirectHandler(BaseHandler):
     # maximum number of redirections to any single URL
     # this is needed because of the state that cookies introduce
@@ -558,7 +559,7 @@
         if not request.has_header('Host'):
             request.add_unredirected_header('Host', sel_host or host)
         for name, value in self.parent.addheaders:
-            name = string.capitalize(name)
+            name = name.capitalize()
             if not request.has_header(name):
                 request.add_unredirected_header(name, value)
 


More information about the wwwsearch-commits mailing list