We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent aef5edf commit c5a1be2Copy full SHA for c5a1be2
Lib/http/cookiejar.py
@@ -538,12 +538,8 @@ def parse_ns_headers(ns_headers):
538
def is_ip_like_hostname(text):
539
"""Return True if text is a valid hostname in the form of IP address.
540
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
+ A valid IP-like hostname is either an IPv4 address or
+ an IPv6 enclosed in brackets (for instance, "[::1]").
547
"""
548
from ipaddress import IPv4Address, IPv6Address
549
# check for IPv4 address
0 commit comments