Skip to content

Commit c5a1be2

Browse files
LamentXU123picnixz
andauthored
Update Lib/http/cookiejar.py
Co-authored-by: Bénédikt Tran <[email protected]>
1 parent aef5edf commit c5a1be2

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

Lib/http/cookiejar.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -538,12 +538,8 @@ def parse_ns_headers(ns_headers):
538538
def is_ip_like_hostname(text):
539539
"""Return True if text is a valid hostname in the form of IP address.
540540
541-
If text is a valid IPv4 address, retrun True;
542-
543-
If text is a valid IPv6 address wrapped in [], return True;
544-
545-
Else, return False.
546-
541+
A valid IP-like hostname is either an IPv4 address or
542+
an IPv6 enclosed in brackets (for instance, "[::1]").
547543
"""
548544
from ipaddress import IPv4Address, IPv6Address
549545
# check for IPv4 address

0 commit comments

Comments
 (0)