From: Georg Brandl Date: Sun, 26 Mar 2006 20:59:38 +0000 (+0000) Subject: Bug #1457264: parse http://host?query correctly in urllib X-Git-Tag: v2.5a0~84 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1c168d8eebd927d95f069848568262ebc0b90cd6;p=python Bug #1457264: parse http://host?query correctly in urllib --- diff --git a/Lib/urllib.py b/Lib/urllib.py index aeca3f1007..d1c50f6192 100644 --- a/Lib/urllib.py +++ b/Lib/urllib.py @@ -1031,7 +1031,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)