Subject: | Bug: scalar $rr->txtdata returns strings joined with spaces |
Date: | Mon, 5 Dec 2016 14:38:18 +0100 |
To: | bug-Net-DNS [...] rt.cpan.org |
From: | Jan-Pieter Cornet <johnpc [...] xs4all.net> |
Subject: | Bug: scalar $rr->txtdata returns strings joined with spaces |
To: | bug-Net-DNS [...] rt.cpan.org |
From: | Jan-Pieter Cornet <johnpc [...] xs4all.net> |
Hi Net::DNS team,
The scalar variant of Net::DNS::RR::TXT->txtdata returns the individual strings from the TXT record separated with spaces, instead of glued together as specified in
https://tools.ietf.org/html/rfc6376#section-3.6.2.2 and https://tools.ietf.org/html/rfc4408#section-3.1.3
Example:
$ perl -MNet::DNS -le 'print "Net::DNS version $Net::DNS::VERSION"; $rr = Net::DNS::RR->new(q{name IN TXT "very long " "string here"}); print scalar $rr->txtdata'
Net::DNS version 1.04
very long string here
That is supposed to print "very long string here" in the last line, not "very long string here" with 2 spaces between "long" and "string".
Patch attached.
--
Jan-Pieter Cornet <johnpc@xs4all.net>
Systeembeheer XS4ALL Internet bv
www.xs4all.nl
Message body is not shown because sender requested not to inline it.
Message body not shown because it is not plain text.