]> granicus.if.org Git - python/commitdiff
Bug #1457264: parse http://host?query correctly in urllib
authorGeorg Brandl <georg@python.org>
Sun, 26 Mar 2006 20:59:38 +0000 (20:59 +0000)
committerGeorg Brandl <georg@python.org>
Sun, 26 Mar 2006 20:59:38 +0000 (20:59 +0000)
Lib/urllib.py

index aeca3f1007343e31b1418c75ef3d43c69d10ad19..d1c50f61920d01762f6b6d59d1511519172e32e6 100644 (file)
@@ -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)