Bugs item #974757, was opened at 2004-06-17 09:09 Message generated for change (Comment added) made by akrherz You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=974757&group_id=5470
Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Python Library Group: None Status: Closed Resolution: Fixed Priority: 5 Private: No Submitted By: Chris Withers (fresh) Assigned to: Jeremy Hylton (jhylton) Summary: urllib2's HTTPPasswordMgr and uri's with port numbers Initial Comment: 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 ;-) ---------------------------------------------------------------------- Comment By: Daryl Herzmann (akrherz) Date: 2007-03-07 13:27 Message: Logged In: YES user_id=341971 Originator: NO 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 :) ---------------------------------------------------------------------- Comment By: Jeremy Hylton (jhylton) Date: 2004-12-22 08:27 Message: Logged In: YES user_id=31392 Fixed in rev 1.78 of urllib2 ---------------------------------------------------------------------- Comment By: Chris Withers (fresh) Date: 2004-11-05 04:08 Message: Logged In: YES user_id=24723 This patch fixes it for me: --- urllib2.py.cvs Fri Nov 05 10:02:26 2004 +++ urllib2.py.new 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, req.get_full_url()) if pw is not None: raw = "%s:%s" % (user, pw) auth = 'Basic %s' % base64.encodestring(raw).strip() ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=974757&group_id=5470 _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com