summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1999-07-01 23:20:56 (GMT)
committerGuido van Rossum <guido@python.org>1999-07-01 23:20:56 (GMT)
commit3427c1f71b584884142bc764be7b4f6b3efde3da (patch)
tree3c856de3e2d29509df9d23c4adb6a0520ff5bd49
parente4694eba0f25f3676d28ccddfc8652a020f54ec9 (diff)
downloadcpython-3427c1f71b584884142bc764be7b4f6b3efde3da.zip
cpython-3427c1f71b584884142bc764be7b4f6b3efde3da.tar.gz
cpython-3427c1f71b584884142bc764be7b4f6b3efde3da.tar.bz2
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.
-rw-r--r--Lib/urllib.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/urllib.py b/Lib/urllib.py
index c12f451..ad1e791 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)