ko-zu / psl

publicsuffixlist for python
Mozilla Public License 2.0
62 stars 10 forks source link

Uppercase domain causes inconsistent result for TLD #20

Closed ko-zu closed 2 years ago

ko-zu commented 2 years ago

publicsuffix() in 0.7.14 returns non-lower suffix for TLDs.

psl = publicsuffixlist.PublicSuffixList()
psl.publicsuffix("example.COM") # => "com"
psl.publicsuffix("COM") # => "COM"

the shortcut code path for TLD-only domain should return lowered one for consistency.