]> jfr.im git - irc/rizon/acid.git/commitdiff
Merge branch 'dwarf/moo+vhostfix' into 'master'
authorAdam <redacted>
Wed, 24 Sep 2014 21:46:05 +0000 (21:46 +0000)
committerAdam <redacted>
Wed, 24 Sep 2014 21:46:05 +0000 (21:46 +0000)
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

pyva/pyva/src/main/python/moo/requests.py

index 5624c7846da6e208dcd0632c07a8ba8099306f1a..eead77638da233733a6bfecd954ed32ed3dc74d5 100644 (file)
@@ -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)