When the advertised service has no TXT data, the RDATA generated is invalid. RFC 1035 3.3.14. mandates TXT RDATA be "One or more <character-string>s". Currently ciao generates zero <character-string>s if there is no TXT data associated with the service.
In this case other server implementations seem to return a TXT RDATA containing one <character-string> of zero length which is valid according to the RFC.
Most client implementations gracefully handle the invalid data. iOS 17 does not, so currently services advertised by ciao are not discoverable on iOS 17.
:bulb: Proposed solution
Follow other server implementations' behavior: return one <character-string> having length of 0. this.txt is assigned accordingly in TXTRecord constructor.
:recycle: Current situation
When the advertised service has no TXT data, the RDATA generated is invalid. RFC 1035 3.3.14. mandates TXT RDATA be "One or more <character-string>s". Currently ciao generates zero <character-string>s if there is no TXT data associated with the service.
In this case other server implementations seem to return a TXT RDATA containing one <character-string> of zero length which is valid according to the RFC.
Most client implementations gracefully handle the invalid data. iOS 17 does not, so currently services advertised by ciao are not discoverable on iOS 17.
:bulb: Proposed solution
Follow other server implementations' behavior: return one <character-string> having length of 0.
this.txt
is assigned accordingly inTXTRecord
constructor.:gear: Release Notes
Fix TXT record encoding according to RFC 1035.
Testing
No changes.
Reviewer Nudging
Oneliner! ;)