diff --git a/aiodnsresolver.py b/aiodnsresolver.py index 2222061..0b8b312 100644 --- a/aiodnsresolver.py +++ b/aiodnsresolver.py @@ -605,7 +605,8 @@ def rdata_expires_at(record, expires_at): return \ IPv4AddressExpiresAt(record.rdata, expires_at) if record.qtype == TYPES.A else \ IPv6AddressExpiresAt(record.rdata, expires_at) if record.qtype == TYPES.AAAA else \ - BytesExpiresAt(record.rdata.lower(), expires_at) + BytesExpiresAt(record.rdata.lower(), expires_at) if record.qtype == TYPES.CNAME else \ + BytesExpiresAt(record.rdata, expires_at) def rdata_expires_at_min(rdatas, expires_at): return tuple( diff --git a/test.py b/test.py index dad0250..d0a4656 100644 --- a/test.py +++ b/test.py @@ -1688,6 +1688,8 @@ async def test_a_query_multiple(self): async def test_txt_query(self): resolve, _ = Resolver() res = await resolve('charemza.name', TYPES.TXT) + all_lowercase = all(r == r.lower() for r in res) + self.assertFalse(all_lowercase) self.assertIn(b'google', res[0]) @async_test