Commit 3427c1f7 authored by Guido van Rossum's avatar Guido van Rossum

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.
parent e4694eba
......@@ -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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment