This PR changes the rdata::Txt type to reject empty record data as invalid.
RFC 1035 states that the TXT-DATA is “One or more \<character-string>s”. This means that there will have to be at least the length octet of the first character string.
The PR also adjusts the TxtBuilder to never return a empty data. Since this requires being able to return an error in TxtBuilder:.finish, this is a breaking change. While at it, the PR also adds more control over the created character strings by making close_char_str public and adding a new append_char_str method.
The PR also improves the documentation for the TXT record data types.
This PR changes the
rdata::Txt
type to reject empty record data as invalid.RFC 1035 states that the TXT-DATA is “One or more \<character-string>s”. This means that there will have to be at least the length octet of the first character string.
The PR also adjusts the
TxtBuilder
to never return a empty data. Since this requires being able to return an error inTxtBuilder:.finish
, this is a breaking change. While at it, the PR also adds more control over the created character strings by makingclose_char_str
public and adding a newappend_char_str
method.The PR also improves the documentation for the TXT record data types.
Fixes #260.