[Top] [All Lists]

Re: Revisiting RFC 2822 grammar (obs-utext)

2004-01-16 06:31:26

Pete Resnick wrote:

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

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 believe that the only place that comes up is in 2822's "unstructured":

unstructured    =       *([FWS] utext) [FWS]

and could be rewritten to prevent the problem noted. Or a note could be added stating
that any CRLF which is part of obs-utext must be followed by WS.

Further note that this is obs-syntax, which is not for generation of new messages.

Also note that ASCII NUL is included in obs-char.