[Python-checkins] CVS: python/dist/src/Lib urllib.py,1.111,1.112

Guido van Rossum gvanrossum@users.sourceforge.net
Mon, 15 Jan 2001 10:31:15 -0800


Update of /cvsroot/python/python/dist/src/Lib
In directory usw-pr-cvs1:/tmp/cvs-serv19003

Modified Files:
	urllib.py 
Log Message:
- Make sure to quote the username and password (SF patch #103236 by
  dogfort).

- Don't drop the data argument when calling open_https() from the
  authentication error handler.


Index: urllib.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/urllib.py,v
retrieving revision 1.111
retrieving revision 1.112
diff -C2 -r1.111 -r1.112
*** urllib.py	2001/01/15 03:34:38	1.111
--- urllib.py	2001/01/15 18:31:13	1.112
***************
*** 564,568 ****
          user, passwd = self.get_user_passwd(host, realm, i)
          if not (user or passwd): return None
!         host = user + ':' + passwd + '@' + host
          newurl = 'http://' + host + selector
          if data is None:
--- 564,568 ----
          user, passwd = self.get_user_passwd(host, realm, i)
          if not (user or passwd): return None
!         host = quote(user, safe='') + ':' + quote(passwd, safe='') + '@' + host
          newurl = 'http://' + host + selector
          if data is None:
***************
*** 577,583 ****
          user, passwd = self.get_user_passwd(host, realm, i)
          if not (user or passwd): return None
!         host = user + ':' + passwd + '@' + host
          newurl = '//' + host + selector
!         return self.open_https(newurl)
  
      def get_user_passwd(self, host, realm, clear_cache = 0):
--- 577,583 ----
          user, passwd = self.get_user_passwd(host, realm, i)
          if not (user or passwd): return None
!         host = quote(user, safe='') + ':' + quote(passwd, safe='') + '@' + host
          newurl = '//' + host + selector
!         return self.open_https(newurl, data)
  
      def get_user_passwd(self, host, realm, clear_cache = 0):