[Top] [All Lists]

Re: Format=Flowed/RFC 2646 Bis (-03)

2003-11-19 02:43:16

Randall Gellens <randy(_at_)qualcomm(_dot_)com> wrote:

Note that the idea was to allow signature separator lines to be
quoted, but not stuffed unless also quoted.  That way, stuffing can
be used to guard against a line being confused with a signature

I failed to notice that subtlety.  Hmmm, are you sure that's what you
want?  That would be the only place where quoting and stuffing are not
orthogonal.  It looks like it might be asking for trouble.  Consider
this format=flowed message body:


The first two lines end with a space, and the third does not.  According
to your definition of separator lines, this is a single paragraph,
because the middle line is a flowed line, not a separator line.  But
what happens if I try to quote that paragraph by inserting a quote
indicator before each line:


According to your definition of separator lines, this is now an invalid
format=flowed message body, because it contains a flowed line followed
by a separator line.

There would be no such gotcha if quoting and stuffing were kept
independent.  The rule could be that separator lines are still separator
lines after being stuffed, or that separator lines cease to be separator
lines when they are stuffed, as long as it is the same for both quoted
and unquoted lines.

The suggested definitions for flowed lines attempt to eliminate the
ambiguity between a flowed line and a signature separator but I don't
think they allow for all cases of flowed lines.

I wouldn't be surprised if I made a mistake in that tricky part of the
grammar, but can you produce a concrete example of a line that ought to
be flowed and doesn't match my suggested flowed-line production?  That
would be the surest way to expose the problem.

It's also possible that the grammar is correct, but structured in a
confusing way.  If that's the case, I welcome suggestions for less
confusing ways of expressing the same syntax.

For convenience, here's another copy of the relevant parts of the
grammar that I suggested:

flowed-line       = quote (stuff stuffed-flowed / unstuffed-flowed) flow CRLF
stuffed-flowed    = [non-dash *text-char] /
                    "-" [non-dash *text-char / "-" 1*text-char]
                    ; Is not "--".
unstuffed-flowed  = non-sp-quote-dash *text-char /
                    "-" [non-dash *text-char / "-" 1*text-char]
                    ; Not empty, not "--", does not begin with SP or ">".
quote             = *">"
stuff             = SP
flow              = SP

I haven't yet looked at the -04 draft.  I'll hold off making any more
comments until I have.