ietf-822
[Top] [All Lists]

Re: multipart clarifications/nits

1994-10-25 15:52:49
Using your new BNF, I would word it as:

body-part := <"message" as defined in RFC 822, with all
              header fields optional, not starting with the
            specified dash-boundary, and with a CRLF followed
            by the specified dash-boundary
              not occurring anywhere in the message body.
              Note that the semantics of a part
              differ from the semantics of a message, as
              described in the text.>

I like your wording a lot better.

If the terminating CRLF is moved back to the encapsulation from the
delimiter, then the "CRLF followed by the specified dash-boundary" can
be simplified to "the specified delimiter".

Agreed. This makes it cleaner given the new wording.

Well, this is part of the price you pay for using ABNF, I'm afraid. I've
changed things to refer to LWSP instead of spaces, but aside from calling
attention to the places where LWSP is not allowed that's about all I can do.

I'm starting to get confused.  Since this isn't a structured field
body we're parsing, free insertion of linear-white-space is not
implied (good thing, I don't want to have to parse 822-comments here).

It may not be implied, but it is important to state specifically that it 
doesn't apply in this area.

From the grammar, there is no reason to think that LWSP would be
allowed anywhere.  The comments that LWSP aren't allowed in particular
places seem to be redundant and confusing.

I've changed this so that the a single note appears at the end that says
LWSP insertion rules don't apply to this section of the BNF.

The text, on the other hand, implies that LWSP has to be ignored in
certain places (like the ends of delimiter lines).  This requirement
is not reflected in the grammar.

Sigh. It only was if you took RFC 822 header field rules to apply and then
made the listed exceptions. It is much cleaner to simply insert it explicitly
in the places where it is allowed (after the delimiter or close-delimiter),
so this is what I've done.

I also noted that LWSP is in fact NOT a formal term defined by RFC 822. The
proper formal term is linear-white-space, so that's what I used.

The resulting BNF is:

dash-boundary := "--" boundary
                 ; boundary taken from Content-Type
                 ; field.

multipart-body := preamble dash-boundary
                  [linear-white-space] CRLF
                  body-part *encapsulation 
                  close-delimiter [linear-white-space]
                  CRLF epilogue

encapsulation := delimiter [linear-white-space]
                 CRLF body-part

delimiter := CRLF dash-boundary

close-delimiter := CRLF dash-boundary "--"

preamble := discard-text

epilogue := discard-text

discard-text := *text *(*text CRLF)
                ; To be ignored upon receipt.

body-part := <"message" as defined in RFC 822, with all
              header fields optional, not starting with the
              specified dash-boundary, and with the 
              delimiter not occurring anywhere in the
              message body.  Note that the semantics of a
              part differ from the semantics of a message,
              as described in the text.>

IMPORTANT NOTE:  The addition of LWSP between the elements shown in this BNF is
NOT allowed since this BNF does not specify a structured header field.

Do you approve of the result? The syntax and semantics are the same, of course,
but I think it is now much easier to follow.

                                Ned

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