]> git.ipfire.org Git - thirdparty/dnspython.git/commitdiff
we should not canonicalize SVCB/HTTPS alias target either!
authorBob Halley <halley@dnspython.org>
Tue, 6 Oct 2020 16:33:57 +0000 (09:33 -0700)
committerBob Halley <halley@dnspython.org>
Tue, 6 Oct 2020 16:33:57 +0000 (09:33 -0700)
dns/rdtypes/svcbbase.py
tests/test_svcb.py

index b8b405944cc0f572d7514f828de2b615049a4647..f757f02640e7889486128f6a2f202845a6387efa 100644 (file)
@@ -497,7 +497,7 @@ class SVCBBase(dns.rdata.Rdata):
 
     def _to_wire(self, file, compress=None, origin=None, canonicalize=False):
         file.write(struct.pack("!H", self.priority))
-        self.target.to_wire(file, None, origin, canonicalize)
+        self.target.to_wire(file, None, origin, False)
         for key in sorted(self.params):
             file.write(struct.pack("!H", key))
             value = self.params[key]
index 51126df9b516f4dfc63b8dc27d0721d81dc48645..7cd776881af3fa138c327339f517a5ce98733d58 100644 (file)
@@ -315,7 +315,7 @@ class SVCBTestCase(unittest.TestCase):
 
     def test_alias_not_compressed(self):
         rrs = dns.rrset.from_text('elsewhere.', 300, 'in', 'svcb',
-                                  '0 elsewhere.')
+                                  '0 elseWhere.')
         output = io.BytesIO()
         compress = {}
         rrs.to_wire(output, compress)
@@ -323,4 +323,4 @@ class SVCBTestCase(unittest.TestCase):
         # Just one of these assertions is enough, but we do both to show
         # the bug we're checking is fixed.
         assert not wire.endswith(b'\xc0\x00')
-        assert wire.endswith(b'\x09elsewhere\x00')
+        assert wire.endswith(b'\x09elseWhere\x00')