Subject: [art] Seeking clarification on boundary delimiters in RFC 2046

From: Peter Occil <[email-masked]>
Date: Sun, 22 Jul 2018 00:12:33 -0400

RFC 2046 sec. 5.1 contains the following:

   NOTE TO IMPLEMENTORS:  Boundary string comparisons must compare the
   boundary value with the beginning of each candidate line.  An exact
   match of the entire candidate line is not required; it is sufficient
   that the boundary appear in its entirety following the CRLF.

Say a message has the following media type:

   multipart/mixed; boundary="b1"

It seems obvious that the following all work the same way as marking the next
body part in the message:

   --b1

   --b1BOUNDARY

   --b1 (followed by whitespace)

What is not clear is whether any or all of the following work as
the boundary delimiter marking the end of all body parts (no example
is included in RFC 2045 clarifying this matter):

   --b1--

   --b1BOUNDARY--

   --b1--BOUNDARY

   --b1--  (followed by whitespace)

   --b1--BOUNDARY (followed by whitespace)

Can this be clarified?

---

From: Ned Freed <[email-masked]>
Date: Sun, 22 Jul 2018 08:12:09 -0700 (PDT)

> is included in RFC 2045 clarifying this matter):

This is why we have ABNF. And the ABNF is very clear - the dash-boundary must
immediately follow the delimiter to be considered to be a closing delimiter:

   close-delimiter := delimiter "--"

>    --b1--

This is a close-delimiter.

>    --b1BOUNDARY--

This is a dash-boundary but not a close-delimiter.

>    --b1--BOUNDARY

This is a close-delimiter.

>    --b1--  (followed by whitespace)

This is a close-delimiter.

>    --b1--BOUNDARY (followed by whitespace)

This is a close-delimiter.

> Can this be clarified?

Why? The ABNF spells this out very clearly.

				Ned

---

From: Peter Occil <[email-masked]>
Date: Sun, 22 Jul 2018 12:19:05 -0400

You have clarified this matter enough.  Thank you.

-----

A further observation.  What hung me up was the fact that the note to implementors spoke of the “boundary value” or “the boundary” (which I understood to be the value of the media type’s boundary parameter) rather than the “dash-boundary” or the “close-delimiter”.  It would have been better with text like the following, but I see no rush or need to update RFC 2046 with such text now:

   NOTE TO IMPLEMENTORS: Boundary string comparisons must compare the dash-boundary or the close-delimiter with the beginning of each candidate line.  […] it is sufficient that the dash-boundary or the close-delimiter appear […] .

Again, you have clarified this matter enough for me.  Thank you again.

--Peter

From: Ned Freed
Sent: Sunday, July 22, 2018 11:21 AM
To: Peter Occil
Cc: [email-masked]
Subject: Re: [art] Seeking clarification on boundary delimiters in RFC 2046

				Ned