php/php-src — pull request #569 by Synchro (2014-01-20 10:39:25+00:00)
Title: Fixed bug #54821 (Add support for SPF records to dns_get_record)

This patch adds support for the SPF record type defined in RFC4408. The patch duplicates most of what the TXT record handling does, but it uses the correct DNS record type. I used a spare bit in the bitfield for the new type.

Strictly speaking this functionality will be deprecated in a forthcoming [update to RFC4498](http://tools.ietf.org/html/draft-ietf-spfbis-4408bis-21#page-13), but the SPF type remains a valid RR type which PHP cannot currently query without this patch.

While writing this I spotted an inconsistency in the windows version: it uses the `DNS_TYPE_TEXT` constant instead of `DNS_TYPE_TXT` (which matches the actual type name). It uses it consistently, but it's asking for trouble when all the other constants match across platforms.