Skip to content

Commit 3d59ed9

Browse files
authored
Update cookiejar.py
1 parent e01652e commit 3d59ed9

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

Lib/http/cookiejar.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -556,7 +556,7 @@ def is_HDN(text):
556556
# XXX
557557
# This may well be wrong. Which RFC is HDN defined in, if any (for
558558
# the purposes of RFC 2965)?
559-
if is_ip(text):
559+
if is_ip_like(text):
560560
return False
561561
if text == "":
562562
return False
@@ -609,7 +609,7 @@ def liberal_is_HDN(text):
609609
For accepting/blocking domains.
610610
611611
"""
612-
return not is_ip(text)
612+
return not is_ip_like(text)
613613

614614
def user_domain_match(A, B):
615615
"""For blocking/accepting domains.
@@ -659,12 +659,12 @@ def eff_request_host(request):
659659
from ipaddress import IPv6Address
660660
try:
661661
IPv6Address(req_host.removeprefix('[').removesuffix(']'))
662-
is_IPV6 = True
662+
is_ipV6 = True
663663
except ValueError:
664-
is_IPV6 = False
664+
is_ipV6 = False
665665
else:
666-
is_IPV6 = False
667-
if "." not in req_host and not is_IPV6:
666+
is_ipV6 = False
667+
if "." not in req_host and not is_ipV6:
668668
# avoid adding .local at the end of a IPV6 address
669669
erhn = req_host + ".local"
670670
return req_host, erhn

0 commit comments

Comments
 (0)