This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Title: urllib2's HTTPPasswordMgr and uri's with port numbers
Type: Stage:
Components: Library (Lib) Versions:
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: jhylton Nosy List: akrherz, fresh, jhylton
Priority: normal Keywords:

Created on 2004-06-17 14:09 by fresh, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (4)
msg21209 - (view) Author: Chris Withers (fresh) Date: 2004-06-17 14:09
Python 2.3.3

The title just about sums it up.
If you add a password with a uri containing a port
number using add_password, then it probably won't be
returned by find_user_password.

That's not right ;-)
msg21210 - (view) Author: Chris Withers (fresh) Date: 2004-11-05 10:08
Logged In: YES 

This patch fixes it for me:

---      Fri Nov 05 10:02:26 2004
+++      Fri Nov 05 10:05:48 2004
@@ -720,7 +720,7 @@
                     return self.retry_http_basic_auth(host,
req, realm)

     def retry_http_basic_auth(self, host, req, realm):
-        user,pw = self.passwd.find_user_password(realm, host)
+        user,pw = self.passwd.find_user_password(realm,
         if pw is not None:
             raw = "%s:%s" % (user, pw)
             auth = 'Basic %s' %
msg21211 - (view) Author: Jeremy Hylton (jhylton) (Python triager) Date: 2004-12-22 14:27
Logged In: YES 

Fixed in rev 1.78 of urllib2
msg21212 - (view) Author: Daryl Herzmann (akrherz) Date: 2007-03-07 19:27
Just for anybody like me stumbling into this.  It isn't fixed in python 2.4.3 and 
only works in python 2.5 .  Another reason to upgrade :)
Date User Action Args
2022-04-11 14:56:04adminsetgithub: 40412
2004-06-17 14:09:59freshcreate