1 つの電子メール サービスからのヘッダーを解析できない MIME パーサーをデバッグしています。電子メール サービスには、次のように完全に次の行にあるフィールド ボディで構成されるヘッダーが含まれます。
Message-Id:
<12345.67890.abcdef@example.com>
これは合法ですか?
RFC-822 では、有効なヘッダーについて次の文法が指定されています。
3.2. HEADER FIELD DEFINITIONS
These rules show a field meta-syntax, without regard for the
particular type or internal syntax. Their purpose is to permit
detection of fields; also, they present to higher-level parsers
an image of each field as fitting on one line.
field = field-name ":" [ field-body ] CRLF
field-name = 1*<any CHAR, excluding CTLs, SPACE, and ":">
field-body = field-body-contents
[CRLF LWSP-char field-body]
field-body-contents =
<the ASCII characters making up the field-body, as
defined in the following sections, and consisting
of combinations of atom, quoted-string, and
specials tokens, or else consisting of texts>
空の文字列は、field-body-contents を満たし、field-body の[CRLF LWSP field-body]
一部を許可しますか?