NLnetLabs / domain

A DNS library for Rust.
https://nlnetlabs.nl/projects/domain/about/
BSD 3-Clause "New" or "Revised" License
341 stars 57 forks source link

Fix TXT record serialization. #272

Closed partim closed 5 months ago

partim commented 6 months ago

This PR fixes TXT record data serialization for human-readable formats. TXT record data is now serialized as a sequence of character strings. It also deserializes from such a sequence. If supported by the format, it alternatively deserializes from a string that is broken up into 255 octet chunks if necessary.

It uses a newly added helper type base::charstr::DeserializeCharStrSeed that deserializes character strings by appending them to an octets builder. Since this may be useful for other cases, it has been made public.

This is a breaking change.

This fixes #268.