netty5/codec-dns/src/test/java/io/netty/handler/codec/dns
Norman Maurer 6bf7e24389 [#5014] Correctly encode / decode zero-length names when encoding DnsRecords.
Motivation:

Zero-length names needs to be "prefixed" by the length as well when encoded into a ByteBuf. Also some servers not correctly prefix these so we should ensure we can workaround this and even decode in such case.

Modifications:

- Always encode the length of the name into the ByteBuf even if its zero-length.
- If there are no readable bytes for the name just asume its an empty name to workaround dns servers that not fully respect the RFC.

Result:

Correctly encode zero-length names and be able to decode empty names even when the rfc is not strictly followed.
2016-03-24 13:51:04 +01:00
..
AbstractDnsRecordTest.java [#4993] Correctly handle trailing dot in DNS requests and responses for the hostname. 2016-03-22 12:30:46 +01:00
DefaultDnsRecordDecoderTest.java [#5014] Correctly encode / decode zero-length names when encoding DnsRecords. 2016-03-24 13:51:04 +01:00
DefaultDnsRecordEncoderTest.java [#5014] Correctly encode / decode zero-length names when encoding DnsRecords. 2016-03-24 13:51:04 +01:00
DnsQueryTest.java Fix a test failure in DnsQueryTest 2015-05-01 12:03:44 +09:00
DnsRecordTypeTest.java Revamp DNS codec 2015-05-01 11:33:16 +09:00
DnsResponseTest.java Revamp DNS codec 2015-05-01 11:33:16 +09:00