Subject: | txtdata() potentially useful but breaks spec |
I'm looking at the Net::DNS::RR::TXT::txtdata() method:
sub txtdata {
my $self = shift;
return join(' ', $self->char_str_list());
}
and believe that the RFC is clear about how to interpret multi-value TXT RHS's: the values are to be concatenated with no spaces between them. So the function, in the abstract, is useful. It just does the wrong thing.
Quoting RFC-4408:
3.1.3. Multiple Strings in a Single DNS record
As defined in [RFC1035] sections 3.3.14 and 3.3, a single text DNS
record (either TXT or SPF RR types) can be composed of more than one
string. If a published record contains multiple strings, then the
record MUST be treated as if those strings are concatenated together
without adding spaces. For example:
IN TXT "v=spf1 .... first" "second string..."
MUST be treated as equivalent to
IN TXT "v=spf1 .... firstsecond string..."
SPF or TXT records containing multiple strings are useful in
constructing records that would exceed the 255-byte maximum length of
a string within a single TXT or SPF RR record.