mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
Merged revisions 86520 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r86520 | senthil.kumaran | 2010-11-18 23:36:41 +0800 (Thu, 18 Nov 2010) | 3 lines Fix Issue2244 - urllib unquotes user and password info multiple times - Patch by Theodore Turocy ........
This commit is contained in:
parent
f2849f0fb4
commit
723a7a6d93
3 changed files with 18 additions and 8 deletions
|
@ -700,7 +700,7 @@ def splituser(host):
|
|||
_userprog = re.compile('^(.*)@(.*)$')
|
||||
|
||||
match = _userprog.match(host)
|
||||
if match: return map(unquote, match.group(1, 2))
|
||||
if match: return match.group(1, 2)
|
||||
return None, host
|
||||
|
||||
_passwdprog = None
|
||||
|
|
|
@ -1275,8 +1275,8 @@ class FTPHandler(BaseHandler):
|
|||
else:
|
||||
passwd = None
|
||||
host = unquote(host)
|
||||
user = unquote(user or '')
|
||||
passwd = unquote(passwd or '')
|
||||
user = user or ''
|
||||
passwd = passwd or ''
|
||||
|
||||
try:
|
||||
host = socket.gethostbyname(host)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue