ietf-822
[Top] [All Lists]

Re: Revisiting RFC 2822 grammar (obs-utext and unstructured)

2004-01-30 18:06:06

Pete Resnick wrote:

On 1/15/04 at 9:59 PM +0000, Charles Lindsey wrote:

In <3FF7A5FC(_dot_)9080804(_at_)verizon(_dot_)net> 
blilly(_at_)verizon(_dot_)net writes:

obs-utext       =       *LF *CR *(obs-char *LF *CR)
[N.B. was obs-text]


No, that does not work because it allows CRLF not followed by WSP in
the middle of an 'unstructured'.


Yup, because you can have "obs-utext obs-utext" which could be (abc
CR)(LF def).

I think the only way out of that is to rewrite the rule for
'unstructured':

unstructured    =    *(utext [FWS]) obs-ltext
obs-utext    =    (1*LF *CR / 1*CR) obs-char / NUL
obs-ltext    =    *LF *CR


Blech. I'll take a look and see what I can figure out without resorting
to that.

I think that the following does the right thing (obs-utext can be empty
or it can start or end with any ASCII octet and can have any sequence
except CRLF, which is handled in unstructured by FWS, and unstructured
can be completely empty or it can begin or end with utext or FWS, but
any instance of utext is separated from any other instance by FWS):

obs-utext       =       *(*obs-char (*LF / (*CR 1*obs-char))) *CR

unstructured    =       *(utext FWS) *utext


<Prev in Thread] Current Thread [Next in Thread>