Fix #790 tracker hosts not correct for some 3rd-level domain names

This commit is contained in:
Andrew Resch 2009-02-06 09:01:11 +00:00
commit 89b5ca1cfe

View file

@ -532,7 +532,7 @@ class Torrent:
parts = host.split(".") parts = host.split(".")
if len(parts) > 2: if len(parts) > 2:
if parts[-2] in ("co", "com"): if parts[-2] in ("co", "com", "net", "org"):
host = ".".join(parts[-3:]) host = ".".join(parts[-3:])
else: else:
host = ".".join(parts[-2:]) host = ".".join(parts[-2:])