improving hostname extraction

This commit is contained in:
arijitchakraborty 2013-07-18 20:51:56 +05:30
parent ebc136ddb0
commit 66ff34cf05
1 changed files with 1 additions and 5 deletions

View File

@ -22,11 +22,7 @@ class CookieJar(object):
# the cookiejar implementation iterates through all domains
# instead we restrict to potential matches on the domain
req_host = urlparse_cached(request).netloc
# Strip port numbers from netloc, if present
if ':' in req_host:
req_host = req_host.split(':')[0]
req_host = urlparse_cached(request).hostname
if not IPV4_RE.search(req_host):
hosts = potential_domain_matches(req_host)