[Inteproxy-commits] r85 - in trunk: . inteproxy

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Mon May 7 16:17:32 CEST 2007


Author: bh
Date: 2007-05-07 16:17:32 +0200 (Mon, 07 May 2007)
New Revision: 85

Modified:
   trunk/ChangeLog
   trunk/inteproxy/main.py
Log:
* inteproxy/main.py (setup_urllib2): Do not instantiate a
urllib2.HTTPBasicAuthHandler.  Now InteProxy passes 401
responses ("Unauthorized") through to the client.
(IntePasswordManager): Removed because it's no
longer used.


Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog	2007-05-07 13:12:26 UTC (rev 84)
+++ trunk/ChangeLog	2007-05-07 14:17:32 UTC (rev 85)
@@ -1,5 +1,13 @@
 2007-05-07  Bernhard Herzog  <bh at intevation.de>
 
+	* inteproxy/main.py (setup_urllib2): Do not instantiate a
+	urllib2.HTTPBasicAuthHandler.  Now InteProxy passes 401
+	responses ("Unauthorized") through to the client.
+	(IntePasswordManager): Removed because it's no
+	longer used.
+
+2007-05-07  Bernhard Herzog  <bh at intevation.de>
+
 	* inteproxy/gtkapp.py (InteProxyTextView.__init__): Add two new
 	default tags: "title" and "heading"
 	(run_fees_dialog): Replace the label widgets with one

Modified: trunk/inteproxy/main.py
===================================================================
--- trunk/inteproxy/main.py	2007-05-07 13:12:26 UTC (rev 84)
+++ trunk/inteproxy/main.py	2007-05-07 14:17:32 UTC (rev 85)
@@ -22,18 +22,6 @@
 inteproxy_version = "0.1.2"
 
 
-class IntePasswordManager(urllib2.HTTPPasswordMgr):
-
-    def find_user_password(self, realm, authuri):
-        user, password \
-              = urllib2.HTTPPasswordMgr.find_user_password(self, realm, authuri)
-        if user is None:
-            # no password known yet.  Ask the user
-            authuri = "https://" + "".join(self.reduce_uri(authuri))
-            title = "Username for %r realm %r: " % (authuri, realm)
-            user, password = the_application.get_password(title)
-        return user, password
-
 class HTTPRedirectHandler(urllib2.HTTPRedirectHandler):
 
     """A version of urllib2's HTTPRedirectHandler that does not redirect
@@ -57,7 +45,7 @@
 
 
 def setup_urllib2(debuglevel):
-    handlers = [urllib2.HTTPBasicAuthHandler(IntePasswordManager())]
+    handlers = []
     if os.environ.has_key('https_proxy'):
         https_proxy = urlparse.urlsplit(os.getenv('https_proxy'))[1]
         del os.environ['https_proxy']



More information about the Inteproxy-commits mailing list