From: Guido van Rossum Date: Thu, 1 Jul 1999 23:20:56 +0000 (+0000) Subject: Sjoerd Mullender: X-Git-Tag: v1.6a1~1112 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=3427c1f71b584884142bc764be7b4f6b3efde3da;p=thirdparty%2FPython%2Fcpython.git Sjoerd Mullender: In splithost, accept empty host part in URLs. This is required for file URLs that can have an empty host part. For such URLs, we should not return the initial 2 slashes as part of the file name. --- diff --git a/Lib/urllib.py b/Lib/urllib.py index c12f4519cca6..ad1e791386cc 100644 --- a/Lib/urllib.py +++ b/Lib/urllib.py @@ -773,7 +773,7 @@ def splithost(url): global _hostprog if _hostprog is None: import re - _hostprog = re.compile('^//([^/]+)(.*)$') + _hostprog = re.compile('^//([^/]*)(.*)$') match = _hostprog.match(url) if match: return match.group(1, 2)