在什么情况下 DNS 主文件可以包含 CRLF?
In what cases can a DNS master file contain a CRLF?
在阅读 RFC 1035 Section 5.1 以编写主文件解析器时,我偶然发现了以下语句:
5.1. Format
The format of these files is a sequence of entries. Entries are
predominantly line-oriented, though parentheses can be used to continue
a list of items across a line boundary, and text literals can contain
CRLF within the text. Any combination of tabs and spaces act as a
delimiter between the separate items that make up an entry. The end of
any line in the master file can end with a comment. The comment starts
with a ";" (semicolon).
作者所说的“文本文字可以在文本中包含 CRLF”是什么意思?我知道下面的条目是有效的,如 Section 5.3 but I fail to find either an example of the statement or a proper definition of "text literal". I have furthermore searched the companion RFC 1034 中所述,但没有成功提及上述声明。
@ IN SOA VENERA Action\.domains (
20 ; SERIAL
7200 ; REFRESH
600 ; RETRY
3600000; EXPIRE
60) ; MINIMUM
我假设文本文字可以用括号分隔。根据 RFC 1035,以下任何评论是否有效?CRLF 在文件中的有效方式有哪些?
@ IN SOA VENERA Action\.domains (
20 ; Some example of a multi-line comment
inside parentheses
7200
600
3600000
60) ; (Some example of parentheses
inside a multi-line comment)
这意味着这应该是有效的:
example.com. IN TXT "hello,
world"
RFC 作者可能期望它等同于:
example.com. IN TXT "hello,30world"
由于这种情况下行结束编码的歧义(如果平台使用LF作为行结束符,你在TXT记录中是否仍然得到CRLF?),我怀疑这是否被广泛实施。
在阅读 RFC 1035 Section 5.1 以编写主文件解析器时,我偶然发现了以下语句:
5.1. Format
The format of these files is a sequence of entries. Entries are predominantly line-oriented, though parentheses can be used to continue a list of items across a line boundary, and text literals can contain CRLF within the text. Any combination of tabs and spaces act as a delimiter between the separate items that make up an entry. The end of any line in the master file can end with a comment. The comment starts with a ";" (semicolon).
作者所说的“文本文字可以在文本中包含 CRLF”是什么意思?我知道下面的条目是有效的,如 Section 5.3 but I fail to find either an example of the statement or a proper definition of "text literal". I have furthermore searched the companion RFC 1034 中所述,但没有成功提及上述声明。
@ IN SOA VENERA Action\.domains (
20 ; SERIAL
7200 ; REFRESH
600 ; RETRY
3600000; EXPIRE
60) ; MINIMUM
我假设文本文字可以用括号分隔。根据 RFC 1035,以下任何评论是否有效?CRLF 在文件中的有效方式有哪些?
@ IN SOA VENERA Action\.domains (
20 ; Some example of a multi-line comment
inside parentheses
7200
600
3600000
60) ; (Some example of parentheses
inside a multi-line comment)
这意味着这应该是有效的:
example.com. IN TXT "hello,
world"
RFC 作者可能期望它等同于:
example.com. IN TXT "hello,30world"
由于这种情况下行结束编码的歧义(如果平台使用LF作为行结束符,你在TXT记录中是否仍然得到CRLF?),我怀疑这是否被广泛实施。