From: Raymond Hettinger Date: Sun, 18 Aug 2002 20:10:08 +0000 (+0000) Subject: Modify splituser() method to allow an @ in the userinfo field. X-Git-Tag: v2.2.2b1~216 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=bc5282fec74bcb7b502a4fe86006dd9cbd88ec5f;p=thirdparty%2FPython%2Fcpython.git 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. --- diff --git a/Lib/urllib.py b/Lib/urllib.py index 8188d4806f59..d30fbb9de5dc 100644 --- a/Lib/urllib.py +++ b/Lib/urllib.py @@ -954,7 +954,7 @@ def splituser(host): global _userprog if _userprog is None: import re - _userprog = re.compile('^([^@]*)@(.*)$') + _userprog = re.compile('^(.*)@(.*)$') match = _userprog.match(host) if match: return map(unquote, match.group(1, 2))