finalizing support for IPv6

This commit is contained in:
Miroslav Stampar 2012-05-24 21:55:57 +00:00
parent b6d37d766a
commit eed8d7eb5d

View File

@ -3056,7 +3056,9 @@ def getHostHeader(url):
retVal = urlparse.urlparse(url).netloc retVal = urlparse.urlparse(url).netloc
if any(retVal.endswith(':%d' % _) for _ in [80, 443]): if re.search("http(s)?://\[.+\]", url, re.I):
retVal = extractRegexResult("http(s)?://\[(?P<result>.+)\]", url)
elif any(retVal.endswith(':%d' % _) for _ in [80, 443]):
retVal = retVal.split(':')[0] retVal = retVal.split(':')[0]
return retVal return retVal