mirror of https://github.com/scrapy/scrapy.git
improving hostname extraction
This commit is contained in:
parent
ebc136ddb0
commit
66ff34cf05
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in New Issue