flipsasser / addressabler

Addressabler extends the Addressable::URI class to provide information about, and manipulation of, URI strings.
MIT License
21 stars 10 forks source link

.cc domains not parsed properly #1

Closed bartolsthoorn closed 11 years ago

bartolsthoorn commented 11 years ago
[50] pry(main)> uri = Addressable::URI.parse('http://www.bart-blabla.cc')
=> #<Addressable::URI:0x25d2c38 URI:http://www.bart-blabla.cc>
[51] pry(main)> uri.tld
=> ""
[52] pry(main)> uri.domain
=> "cc"

But I expected tld to be cc and domain to be bart-blabla.cc

Another example:

[53] pry(main)> uri = Addressable::URI.parse('http://www.abc.cc')
=> #<Addressable::URI:0x2d99980 URI:http://www.abc.cc>
[54] pry(main)> uri.tld
=> ""
[55] pry(main)> uri.domain
=> "cc"

Is this a known issue?

bartolsthoorn commented 11 years ago

I checked out the source and noticed the TLD list is not complete and unmaintained.

For other viewers, I recommend to use Domainatrix, it is better maintained and has an updated TLD list.

flipsasser commented 11 years ago

Okay. In the future a pull request is also welcomed.