python-string-utils
python-string-utils copied to clipboard
Url validation
Hello,
Here are some scenarios where is_url shows unexpected behaviour:
http://google.abcdefghiis valid butis_urlstatesFalsein its test suite- constraining TLD to length 6 but TLD length specified by RFC 1034 is 63 octets. Real TLDs available here of length >6 http://data.iana.org/TLD/tlds-alpha-by-domain.txt- url with host ending in dot:
http://www.foo.bar./is valid as per https://www.w3.org/Addressing/URL/url-spec.txt#page13 whileis_urlreturnsFalse