mirror of
https://github.com/python/cpython.git
synced 2025-10-22 14:42:22 +00:00
Modify splituser() method to allow an @ in the userinfo field.
Jeremy reported that this is not allowed by RFC 2396; however, other tools support unescaped @'s so we should also. Apply SF patch 596581 closing bug 581529.
This commit is contained in:
parent
1d0eeec279
commit
f2e45dd9dd
1 changed files with 1 additions and 1 deletions
|
@ -968,7 +968,7 @@ def splituser(host):
|
||||||
global _userprog
|
global _userprog
|
||||||
if _userprog is None:
|
if _userprog is None:
|
||||||
import re
|
import re
|
||||||
_userprog = re.compile('^([^@]*)@(.*)$')
|
_userprog = re.compile('^(.*)@(.*)$')
|
||||||
|
|
||||||
match = _userprog.match(host)
|
match = _userprog.match(host)
|
||||||
if match: return map(unquote, match.group(1, 2))
|
if match: return map(unquote, match.group(1, 2))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue