http: explain why the host is passed to urllib2 password manager
authorPatrick Mezard <pmezard@gmail.com>
Sat, 06 Aug 2011 14:10:59 +0200
changeset 15028 eb97a3e38656
parent 15027 1e45b92f4fb2
child 15029 d5f774668102
http: explain why the host is passed to urllib2 password manager The original comment was in url.getauthinfo() and was lost in bf6156bab41b.
mercurial/util.py
--- a/mercurial/util.py	Fri Aug 05 16:07:51 2011 -0500
+++ b/mercurial/util.py	Sat Aug 06 14:10:59 2011 +0200
@@ -1589,8 +1589,10 @@
             self.user, self.passwd = user, passwd
         if not self.user:
             return (s, None)
-        # authinfo[1] is passed to urllib2 password manager, and its URIs
-        # must not contain credentials.
+        # authinfo[1] is passed to urllib2 password manager, and its
+        # URIs must not contain credentials. The host is passed in the
+        # URIs list because Python < 2.4.3 uses only that to search for
+        # a password.
         return (s, (None, (s, self.host),
                     self.user, self.passwd or ''))