From: Adam Date: Wed, 24 Sep 2014 21:46:05 +0000 (+0000) Subject: Merge branch 'dwarf/moo+vhostfix' into 'master' X-Git-Url: https://jfr.im/git/irc/rizon/acid.git/commitdiff_plain/43a85e0b6727d992167c1474580ea6c041edc39d?hp=9d2397f877ae0717c1842608be4daa80e41145cc Merge branch 'dwarf/moo+vhostfix' into 'master' Fix vhosts with gltds resolving New gtlds without records set will resolve to 127.0.53.53 thanks to https://www.icann.org/news/announcement-2-2014-08-01-en, this commit fixes py-moo denying requests that resolve to 127.0.53.53 See merge request !1 --- diff --git a/pyva/pyva/src/main/python/moo/requests.py b/pyva/pyva/src/main/python/moo/requests.py index 5624c78..eead776 100644 --- a/pyva/pyva/src/main/python/moo/requests.py +++ b/pyva/pyva/src/main/python/moo/requests.py @@ -358,6 +358,8 @@ class RequestManager(object): def __is_resolvable(self, host): try: res = getaddrinfo(host, 80) + if res[0][4][0] == '127.0.53.53': # https://www.icann.org/news/announcement-2-2014-08-01-en + return (False, None, None) return (True, res[0][4][0], host) except gaierror, e: return (False, None, None)