From eed8d7eb5dcf6d80ee96cf8bcec765ec4431b7e9 Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Thu, 24 May 2012 21:55:57 +0000 Subject: [PATCH] finalizing support for IPv6 --- lib/core/common.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/core/common.py b/lib/core/common.py index f9ce59aa6..233de59d7 100644 --- a/lib/core/common.py +++ b/lib/core/common.py @@ -3056,7 +3056,9 @@ def getHostHeader(url): 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.+)\]", url) + elif any(retVal.endswith(':%d' % _) for _ in [80, 443]): retVal = retVal.split(':')[0] return retVal