Commit edb1e45e authored by Alexandre's avatar Alexandre
Browse files

Revert commit 640c1041

parent 3abe8161
......@@ -314,10 +314,11 @@ def check_truncated_query(connection, opts, level=remoh.mandatory_levels["niceto
connection.send_and_receive(bundle, dump=connection.debug)
except OpenSSL.SSL.ZeroReturnError: # This is acceptable
return True
except dns.exception.FormError: # This is also acceptable
except dns.exception.FormError as e: # This is also acceptable
# Some DSN resolvers will echo mangled requests with
# the RCODE set to FORMERR
# so response can not be parsed in this case
print_info(e, connection.connect_to, test_name, 'Info', fd=sys.stderr)
return True
except remoh.ConnectionDOTException as e:
print_info(e, connection.connect_to, test_name, 'Info', fd=sys.stderr)
......
......@@ -58,11 +58,7 @@ class RequestDOT(Request):
def store_response(self, rcode, data, size):
self.rcode = True
self.response_size = size
try:
self.response = dns.message.from_wire(data)
except dns.exception.FormError as e:
self.response = "ERROR %s" % e
self.rcode = False
class RequestDOH(Request):
......@@ -94,9 +90,6 @@ class RequestDOH(Request):
if debug:
self.response += " \"%s\"" % response[:100]
self.success = False
except dns.exception.FormError as e:
self.response = "ERROR %s" % e
self.success = False
else:
self.response = response
else:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment